0

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>
Community
  • 1
  • 1
Isuru Gunawardana
  • 2,847
  • 6
  • 28
  • 60
  • You may follow https://docs.wso2.com/display/ESB481/Configure+with+WSO2+Message+Broker and https://docs.wso2.com/display/ESB480/Store+and+Forward+Using+JMS+Message+Stores to get some clue. – Sajith Eshan May 25 '15 at 09:34

1 Answers1

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)

Jean-Michel
  • 5,926
  • 1
  • 13
  • 19
  • You are correct, I set the OUT_ONLY to true, as I need immediate response to be sent to the client. Then I want the processor to send it to the Backend service and forward the response from the backend to the defined sequence, Is there other way I can solve this? – Isuru Gunawardana May 26 '15 at 07:17
  • 1
    I understand that you set OUT_ONLY in the proxy that store the message, is it right ? In this case, this property is saved with the message in the store (in fact, all the Synapse MessageContext is stored) and when the Message Processor send the message to your backend service, no callback is set to receive a response. In the proxy that must respond to your client, you can set FORCE_SC_ACCEPTED (scope axis2) to send back a blank response with http status code 202 or create a dummy response – Jean-Michel May 26 '15 at 07:33
  • Yes, I set OUT_ONLY in the proxy. I used both FORCE_SC_ACCEPTED and OUT_ONLY properties in the proxy. (As given here: https://docs.wso2.com/display/ESB460/Store+and+Forward+Using+JMS+Message+Stores) Could you please explain what is the difference of using both properties and just using the FORCE_SC_ACCEPTED only? – Isuru Gunawardana May 26 '15 at 08:17
  • 1
    FORCE_SC_ACCEPTED offers you a way the send back an ack (http status code 202) to the caller. OUT_ONLY is used to tell the ESB that there will be no response (when you send a message to an endpoint) so, there is no need to instanciate a callback receiver : thoses 2 properties have no relationship – Jean-Michel May 26 '15 at 08:25