Upload
anirban-sen-chowdhary
View
130
Download
0
Embed Size (px)
Citation preview
REST Service with ActiveMQ
By Anirban Sen Chowdhary
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
How to use ActiveMQ with REST in Mule ??
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.
Our Mule config will be as follow:-
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 :-
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
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
Thank You