rest service with active mq

9
REST Service with ActiveMQ

Upload: mdfkhan625

Post on 20-Feb-2017

95 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Rest service with active mq

REST Service with ActiveMQ

Page 2: Rest service with active mq

Could you actually think how a REST web service can be integrated with a JMS queue.Yes, we can re design a Mule Flow to break a flow into 2 to run a REST web service with ActiveMQ

Page 3: Rest service with active mq

How to use ActiveMQ with REST in Mule ??

Page 4: Rest service with active mq

To use Cache with Mule we have to construct our flow in following way :-

You can see the flow is divided into 2 parts and is connected by JMS component. The object to XML Transformer is placed before JMS outbound to make the payload as an XML since a JMS payload cannot be Object type.

Page 5: Rest service with active mq

Our Mule config will be as follow:-

Page 6: Rest service with active mq

Now, our flow is ready .. If we can test our flow in REST client using the url :- http://localhost:8082/getData/retrieve/?id=1 which will retrieve all the value from the database with id=1 as follows :-

Page 7: Rest service with active mq

In log we will get the following which shows it is actually connected to ActiveMQ and displaying the response and which means it is working perfectly

Page 8: Rest service with active mq

In my next slide I will bring some other techniques in Mule implementation .Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow

Page 9: Rest service with active mq

Thank You