2 Replies Latest reply on Aug 9, 2013 12:50 AM by Stuart Fleming

    JMS Queue listener vs. manual/scheduled executions


      We have configured interfaces, packages, scenarios, etc. that start with pulling an XML message from a JMS queue (well, JMS Queue XML data store) and can successfully process our messages in batch mode when we run our executions manually or via a scheduler. However, we'd like our agent to simply listen on the queue for new messages and kick off an execution when a new message comes in...one-by-one (rather than in a batch manual/scheduled mode).

      Can someone please help us with the proper configuration steps for this?

        • 1. Re: JMS Queue listener vs. manual/scheduled executions
          Ayush Ganeriwal-Oracle
          There is no out of the box tool available to do this.
          However, you can develop your own open tool to achieve this and trigger the scenario o actually do the data movement.
          • 2. Re: JMS Queue listener vs. manual/scheduled executions
            Stuart Fleming

            I am investigating this issue myself.   I have come up with two possible scenarios.


            1.  Do it in Java -- Of course this defeats the purpose of using SOA Suite.  In the book SOA Suite 11g handbook, chapter twelve he has a jms adapter publishing to a queue and a java program listening to that queue.    http://technology.amis.nl/2010/09/21/soa-suite-11g-handbook-chapter-complements/

            you can refer to the TheFinancialApplication.


            2.  If you have access to the Jms programs that publish the messages to the queue (that your programs want to listen to) and they are done in SOA Suite 11g, you could use Event Delivery Network (EDN) to create a event on the publishing side-- and then set up your listening processes to listen for that Event (which is jms under the hood).


            You could then have those processes kick off from that event.


            Anyone with a better idea?


            -- Update 8 hours later  -- I have a better idea:


            I created a composite that publishes a JMS message to a queue on weblogic using the jms adapter.  I created a second composite with a jms adapter (on the Exposed services side of the composite)  that Consumes a message, hooked it up to a mediator and then wrote the contents of the message to a file.  Uploaded both.


            Moments after the JMS publisher Composite ran, a file was created.  From this I would surmise that you could run other processes as well.


            -- Update two days later.   So much for the better idea.


            Given that the Flow Trace of the last test looked suspiciously like this one one application and not two separate applications, I decided to test it further.  I have two PCs.  On each PC I have a soa domain, Uploaded the jms publisher to one domain, and the JMS Consumer to the other separate domain on the other PC.   Ran the publisher, and the other one just sat still -- didn't start at all.


            The first test was too good to be true!