SlideShare a Scribd company logo
By Anirban Sen Chowdhary
We have earlier seen how to integrate Mule and ActiveMQ .
We have also seen how to send message to ActiveMQ queue from Mule with a
specific JMS priority and to fetch messages from ActiveMQ queue filtering a
particular JMS priority.
Here we will see how to filter messages to ActiveMQ from Groovy script with a
particular JMS priority
Yes, we can filter payload using Groovy script for the message from ActiveMQ
queue with a particular JMS priority ….
Accessing jms in mule using groovy
Let’s consider we have a simple Mule flow as following:-
Here in we will send messages to an ActiveMQ queue with a particular JMS priority.
Let’s say our queue name be StudioOUT.
So we will be sending messages to queue StudioOUT.
So, our Mule config will be as following:-
You can see we are sending message to queue StudioOUT with JMS priority 9
using the following code :-
<message-properties-transformer>
<add-message-property key="Priority" value="9"/>
</message-properties-transformer>
Now, we will test the flow by hitting url http://localhost:8081/test the message
will be send to queue with JMS priority 9 :-
And, we will also check our ActiveMQ portal we will find the following :-
You can see the message priority is 9 as we have configured JMS priority in our
flow
Now let’s design a flow which will receive message from ActiveMQ queue and filter
it by JMS priority using Groovy script:-
You can see we have used Groovy Script to fetch the message from queue
StudioOUT
Now our Mule config which is using Groovy script is as follow:-
Now if we start our application again we will get as follow:-
And you can see it has consumed the message from queue which has the JMS
priority 9 :-
Thus, you can see that we can also set the filter to consume message from
ActiveMQ using Groovy
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 
Accessing jms in mule using groovy

More Related Content

PPTX
Using groovy in mule
PPTX
Filtering jms messages with mule
PPTX
Soap request in mule
PPTX
Mule with stored procedure
PPTX
Accessing jms in mule using groovy
PPTX
Mule with composite source
PPTX
Webservice vm in mule
PPTX
Mule soap
Using groovy in mule
Filtering jms messages with mule
Soap request in mule
Mule with stored procedure
Accessing jms in mule using groovy
Mule with composite source
Webservice vm in mule
Mule soap

What's hot (9)

PPTX
Mule quartz
PPTX
Mulesoft http connector
PPTX
Web service vm in mule
PPTX
Mule requestor component
PPTX
Stored procedure in Mule
PPTX
Soap in mule
PPTX
Using spring task scheduler in java in mule
PPTX
Mule soap
PPTX
Scatter and gather in mule
Mule quartz
Mulesoft http connector
Web service vm in mule
Mule requestor component
Stored procedure in Mule
Soap in mule
Using spring task scheduler in java in mule
Mule soap
Scatter and gather in mule
Ad

Viewers also liked (20)

PPTX
Scheduling and monitoring with java in mule
PPTX
Accessing Mule variables in groovy
PPTX
Cache for community edition
PPTX
Automatic documentation with mule
PPTX
Mule accessing multiple database in parallel
PPTX
Initialize database in Mule part2
PPTX
Accessing jms in mule using groovy
PPTX
Delaying jms with mule
PPTX
Sharing resources with mule
PPTX
Combing xml in Mule
PPTX
Mule Groovy component
PPTX
Timer Interceptor in Mule
PPTX
Mule dynamic name space
PPTX
Mule idempotent filter and Object Store
PPTX
Splitting with mule part2
PPTX
Sending mail with attachment
PPTX
Calling flow from another application
PPTX
Mapping and listing with mule
PPTX
Running mule from java
PPTX
Dynamic file attribute
Scheduling and monitoring with java in mule
Accessing Mule variables in groovy
Cache for community edition
Automatic documentation with mule
Mule accessing multiple database in parallel
Initialize database in Mule part2
Accessing jms in mule using groovy
Delaying jms with mule
Sharing resources with mule
Combing xml in Mule
Mule Groovy component
Timer Interceptor in Mule
Mule dynamic name space
Mule idempotent filter and Object Store
Splitting with mule part2
Sending mail with attachment
Calling flow from another application
Mapping and listing with mule
Running mule from java
Dynamic file attribute
Ad

Similar to Accessing jms in mule using groovy (20)

PPTX
Accessing jms by groovy
PPT
Simple http and jms for beginners
PPTX
Mule with stored procedure
PPTX
Mule stored procedure
PPTX
Mule with stored procedure
PPTX
Stored procedure in mule
PPTX
Deploying and running in mule standalone
PPTX
Deploying and Running in Mule
PPTX
Deploying and running in mule standalone
PPTX
Deploying and running in mule standalone
PPTX
Deploying and running mule standalone
PPTX
Deploying and running in mule standalone
PPTX
Community edition Cache
PPTX
Cache for community edition
PPTX
Cache community edition
PPTX
Cache for community edition
PPTX
Cache for community edition
PPTX
Cache for community edition
PPTX
Cache for community edition
 
PPTX
Cache for community edition
Accessing jms by groovy
Simple http and jms for beginners
Mule with stored procedure
Mule stored procedure
Mule with stored procedure
Stored procedure in mule
Deploying and running in mule standalone
Deploying and Running in Mule
Deploying and running in mule standalone
Deploying and running in mule standalone
Deploying and running mule standalone
Deploying and running in mule standalone
Community edition Cache
Cache for community edition
Cache community edition
Cache for community edition
Cache for community edition
Cache for community edition
Cache for community edition
 
Cache for community edition

More from Anirban Sen Chowdhary (20)

PPTX
Change the game with Game changer
PPTX
Ring central desktop app overview
PPTX
Overview in ringcentral digital line
PPTX
Some basics with ring central
PPTX
Ring central and python
PPTX
RingCentral application development overview
PPTX
Cloze connect ringcentral
PPTX
Overview on ring central errors part 4
PPTX
Setting up your ring central sandbox in steps
PPTX
Overview on ring central errors: part 2
PPTX
Overview on ring central errors
PPTX
Call recording overview ring central
PPTX
Ring central engaging with amazon alexa
PPTX
How ring central sdk changing the game
PPTX
When ring central connect salesforce
PPTX
Mule 4 connecting ring central
PPTX
Ring central sdk
PPTX
Ring central with okta
PPTX
Ring central connecting salesforce overview
PPTX
Ring central call logs overview (part 2)
Change the game with Game changer
Ring central desktop app overview
Overview in ringcentral digital line
Some basics with ring central
Ring central and python
RingCentral application development overview
Cloze connect ringcentral
Overview on ring central errors part 4
Setting up your ring central sandbox in steps
Overview on ring central errors: part 2
Overview on ring central errors
Call recording overview ring central
Ring central engaging with amazon alexa
How ring central sdk changing the game
When ring central connect salesforce
Mule 4 connecting ring central
Ring central sdk
Ring central with okta
Ring central connecting salesforce overview
Ring central call logs overview (part 2)

Accessing jms in mule using groovy

  • 1. By Anirban Sen Chowdhary
  • 2. We have earlier seen how to integrate Mule and ActiveMQ . We have also seen how to send message to ActiveMQ queue from Mule with a specific JMS priority and to fetch messages from ActiveMQ queue filtering a particular JMS priority. Here we will see how to filter messages to ActiveMQ from Groovy script with a particular JMS priority
  • 3. Yes, we can filter payload using Groovy script for the message from ActiveMQ queue with a particular JMS priority ….
  • 5. Let’s consider we have a simple Mule flow as following:- Here in we will send messages to an ActiveMQ queue with a particular JMS priority. Let’s say our queue name be StudioOUT. So we will be sending messages to queue StudioOUT.
  • 6. So, our Mule config will be as following:- You can see we are sending message to queue StudioOUT with JMS priority 9 using the following code :- <message-properties-transformer> <add-message-property key="Priority" value="9"/> </message-properties-transformer>
  • 7. Now, we will test the flow by hitting url http://localhost:8081/test the message will be send to queue with JMS priority 9 :-
  • 8. And, we will also check our ActiveMQ portal we will find the following :- You can see the message priority is 9 as we have configured JMS priority in our flow
  • 9. Now let’s design a flow which will receive message from ActiveMQ queue and filter it by JMS priority using Groovy script:- You can see we have used Groovy Script to fetch the message from queue StudioOUT
  • 10. Now our Mule config which is using Groovy script is as follow:-
  • 11. Now if we start our application again we will get as follow:-
  • 12. And you can see it has consumed the message from queue which has the JMS priority 9 :- Thus, you can see that we can also set the filter to consume message from ActiveMQ using Groovy
  • 13. 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 