1 Reply Latest reply on May 4, 2012 4:06 PM by Paul Adams

    Broken ActiveMq Queue subscription

    Paul Adams Newbie

      I have written an process on apache-servicemix-4.4.1-fuse-03-06 that involves placing a javax.jms.TextMessage on a queue which is processed by an external java process that has subscribed to that queue.

       

      When I originally wrote the code both fuse and my java process were living on the same box and everything functioned as expected.  I then moved fuse to another host, re-configured the java process to perform the JNDI lookup of the ConnectionFactory/Queue from fuse's new location and now my orchestration does not function.

       

      The subscription is generated fine.  If I manually queue messages from my java client they get picked up and processed normally.  My java process picks up the message, processes it and queues a response fine.  If however the orchestration on the ESB queues the message my subscription does not get the message delivered to it.

       

      The InOut interaction eventually times out and the message disappears from the queue.  Via JMX attached to fuse I can see that the queue depth at this point is in fact 1 so there is something to be delivered. 

       

      If during this period of time waiting for the message to timeout I attempt to browse that queue from my java process the message that is returned to me is 'null', but something is delivered.  It's as if there is some issue with java serialization and the message on the queue since if my java process creates and queues the message then it works fine, but if the esb process creates and queues the message what is delivered to my java process is a 'null' message.  Presumably this is why my subscription doesn't function.

       

      Has anyone seen anything like this or have any pointers on how to debug it?

       

      Edited by: padams on May 3, 2012 6:09 PM

        • 1. Re: Broken ActiveMq Queue subscription
          Paul Adams Newbie

          I did a wireshark trace on the port that connects my java process to the remote activemq installation and I can see that the message comes accross the wire when queued by the remote side but the onMessage method of my consumer is never called.

           

          Activemq logging on the java side didn't produce much interesting information although the InactivityMonitor repeatedly reports that "A receive is in progress", though it seems to do this even before such a failed message is ever queued.

           

          As I mentioned before if I queue a message from another java process it gets delivered just fine, just messages queued by the camel route on the ESB timeout and aren't delivered.