我已经使用 ActiveMQ 与 JMS 建立了一个流程,我向队列发送了一条消息,但是出于任何原因,当我尝试从队列中消费时,获取消息并通过设置新的有效负载来更改它,它不会改变。我究竟做错了什么?
基本上我想通过 HTTP 响应发回更改后的有效负载
这是我的代码:
<jms:activemq-connector name="Active_MQ"
specification="1.1"
brokerURL="tcp://localhost:61616"
validateConnections="true"
doc:name="Active MQ"
persistentDelivery="true"
/>
<flow name="jmsFlow1" doc:name="jmsFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="jms" doc:name="HTTP"/>
<set-payload value="#['This is a message test']" doc:name="Set Payload"/>
<choice doc:name="Choice">
<when expression="#[true]">
<processor-chain>
<logger message="Im here!!" level="INFO" doc:name="Logger"/>
<jms:outbound-endpoint queue="StudioIN" connector-ref="Active_MQ" doc:name="JMS Queue Studio IN" exchange-pattern="request-response"/>
</processor-chain>
</when>
</choice>
<logger message="#[payload]" level="INFO" category="//// RETURNED FROM QUEUE PAYLOAD" doc:name="Logger"/>
</flow>
<flow name="fmsAdapterConsumerFlow1" doc:name="fmsAdapterConsumerFlow1">
<jms:outbound-endpoint queue="StudioIN" connector-ref="Active_MQ" doc:name="JMS StudioIN Consumer" exchange-pattern="request-response"/>
<set-payload value="#[payload + ' returned from queue']" doc:name="Set Payload"/>
</flow>