Sequence defined in the Message Processor doesn

2019-03-05 07:04发布

问题:

I have a separate proxy (in WSO2ESB4.8.1) which sends the message to the message store (which is configured with WSO2MB 2.2.0) and then the processor sends the message to the backend and backend receives the message, but the response from backend doesn't come back to the defined sequence, Seq_IfcFileCheckinResponse in the processor.

My backend is rest service and I am sending a json request. I noticed following warning message in esb console,

WARN - JmsConsumer [JMSMessageStore-C-1]. Did not receive a javax.jms.ObjectMessage

Following configurations for message store and processor,

 <messageStore class="org.apache.synapse.message.store.impl.jms.JmsStore"
                 name="JMSMessageStore">
      <parameter name="java.naming.factory.initial">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
      <parameter name="store.jms.password">admin</parameter>
      <parameter name="java.naming.provider.url">repository/conf/jndi.properties</parameter>
      <parameter name="store.jms.connection.factory">QueueConnectionFactory</parameter>
      <parameter name="store.jms.username">admin</parameter>
      <parameter name="store.jms.destination">IfcQueue</parameter>
      <parameter name="store.jms.JMSSpecVersion">1.1</parameter>
   </messageStore>

and

   <messageProcessor class="org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor"
                     name="JMSMessageProcessor"
                     targetEndpoint="bimserverendpoint"
                     messageStore="JMSMessageStore">
      <parameter name="message.processor.reply.sequence">Seq_IfcFileCheckinResponse</parameter>
      <parameter name="client.retry.interval">5000</parameter>
      <parameter name="max.delivery.attempts">2</parameter>
      <parameter name="interval">1000</parameter>
      <parameter name="message.processor.fault.sequence">ErrorSeq_IfcFileCheckinResponserSeq</parameter>
      <parameter name="is.active">true</parameter>
   </messageProcessor>

回答1:

You should verify that :

  • property "OUT_ONLY" is not set to true in the proxy that put the message in the MessageStore
  • The value of http status code (for the response from your backend service) is 200 or 500 (use tcpmon between ESB and your backend service to have a look to the response)

The warning "Did not receive a javax.jms.ObjectMessage" is logged when you store the message or when the message processor dequeue it from the store ? (deactivate your message processor and call your proxy that store the message in the store)