Using JMS transport (Contd..)

In previous post, you have seen using the JMS transport in business service to enqueue messages into JMS queue. In this post, you will use JMS Transport in proxy service to read/poll messages from JMS queue. The OSB project used for demonstration can be downloaded from this link.

Since DemoQueue has enqueued message (seen in previous post), you will read the same message using a proxy service and route it to another business service which enqueues into DemoQueue1. So create another JMS queue and required JMS resources and create new business service in similar fashion as described in previous post. Set endpoint URI to point to DemoQueue1.

Create Proxy Service and select JMS as Transport Protocol. Set endpoint URI to point to DemoQueue and Connection Factory.

image

Go to JMS Transport tab. Select Queue  as destination type and uncheck Is Response Required as you are not expecting response from business service.

image

Go to Message Flow tab. Drag Publish activity and select new business service in properties. The Publish activity is used for one-way communication and here it routes the JMS message to business service.

image

image

Deploy OSB project and observe that proxy service read the message from DemoQueue and enqueued into DemoQueue. Here your proxy service acts as a MDB that polls your JMS queue for the messages.

image

image

image

13 Responses to “Using JMS transport (Contd..)”


  1. 1 Anonymous March 3, 2014 at 12:56 PM

    I am not able to see the images.can you please upload it again..

  2. 4 vikas August 17, 2013 at 1:18 AM

    Hi Siva : Do you any similar article which demonstrates the steps to connect to the external JMS provider like MQ . Here the JMS resources are weblogic , but in my case the Topics and Queue reside on external IBM MQ server ??

    • 5 svgonugu August 19, 2013 at 10:53 AM

      For MQ, you have to use MQ connection resource. The fields that it asks for while creating this connection resource is more or less self-explanatory. Don’t forget to include MQ related jars in weblogic.

  3. 6 sharar April 29, 2013 at 7:17 PM

    Can we use proxy service to read messages one by one.

    • 7 svgonugu April 29, 2013 at 8:39 PM

      proxy service does read the messages 1 by 1 from the JMS Queue. what exactly you mean one by one? Do you want a message to be read only when previous message is processed by OSB?

      • 8 sharar April 30, 2013 at 9:51 AM

        Thanks svgonugu for your reply.

        My requirement is to make a asynchronous call to OSB,so looking to implement with JMS.Once producer publish the message, proxy service is suppose to forward the messages to different webservices/backend.
        We are not expecting any kind of response from backend. Only have to pass an acknowledge to producer once proxy services have successfully forwarded the message.

        Any help from your side would be much appreciable.

        • 9 svgonugu April 30, 2013 at 11:41 AM

          That’s true that you can use JMS for asynchronous call to OSB. OSB proxy service processes the message one by one. Either it’s the acknowledgment or the response you want to give to the producer, you should be using another JMS queue to push that ACK or Response. And producer should be able to read from that JMS queue.

  4. 10 JyotiBhusan March 21, 2012 at 6:23 PM

    Hi svgonugu,
    Can you plaese provide how to read JMS messages from queue using proxy service.

  5. 12 shashank December 1, 2011 at 5:29 PM

    can I read jms queue with Business Service. The example given by you is other way around?


Leave a reply to svgonugu Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.




Pages

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 379 other subscribers

Enter your email address to follow this blog and receive notifications of new posts by email.