0

该消息将没有任何回复。它只是将消息放在队列中并且确实期望任何“单向”回复但是如果消息处理失败,则需要回滚以便其他服务器可以处理它。因此,为了处理该消息,我正在使用如下所示的发布订阅通道

 <int:publish-subscribe-channel id="SplitChannel">
 </int:publish-subscribe-channel>
 <int-jms:inbound-gateway request-channel="UChannel" request-destination-name="U" extract-request-payload="true" acknowledge="transacted" concurrent-consumers="5" max-messages-per-task="5"/>
 <int:chain input-channel="UChannel">
   <int-http:outbound-gateway
      url="http://localhost/u.php?fileid={fileid}"
      http-method="GET"
      reply-channel="nullChannel">
     <int-http:uri-variable name="fileid" expression="headers.fileid"/>
   </int-http:outbound-gateway>
 </int:chain>

我收到如下错误

DEBUG: [May-30 00:43:28,768] jms.listener.DefaultMessageListenerContainer - Initiating transaction rollback on application exception
javax.jms.InvalidDestinationException: Cannot determine reply destination: Request message does not contain reply-to destination, and no default reply destination set.
DEBUG: [May-30 00:43:28,768] apache.activemq.ActiveMQSession - 43979-1369895783067-0:15:1 Transaction Rollback
4

1 回答 1

2

A<gateway/>是双向积分;通道适配器用于单向;改用一个<int-jms:message-driven-channel-adapter/>

于 2013-05-30T12:35:21.700 回答