SlideShare a Scribd company logo
1 of 14
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 ….
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 
Integrate Mule and ActiveMQ - Filter Messages by JMS Priority Using Groovy

More Related Content

What's hot

Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connectorkumar gaurav
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in muleMohammed246
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor componentSindhu VL
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in MuleKhasim Saheb
 
Using spring task scheduler in java in mule
Using spring task scheduler in java in muleUsing spring task scheduler in java in mule
Using spring task scheduler in java in muleAnirban Sen Chowdhary
 
Scatter and gather in mule
Scatter and gather in muleScatter and gather in mule
Scatter and gather in muleRajkattamuri
 

What's hot (9)

Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connector
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor component
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in Mule
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
 
Using spring task scheduler in java in mule
Using spring task scheduler in java in muleUsing spring task scheduler in java in mule
Using spring task scheduler in java in mule
 
Mule soap
Mule soapMule soap
Mule soap
 
Scatter and gather in mule
Scatter and gather in muleScatter and gather in mule
Scatter and gather in mule
 

Viewers also liked

Scheduling and monitoring with java in mule
Scheduling and monitoring with java in muleScheduling and monitoring with java in mule
Scheduling and monitoring with java in muleAnirban Sen Chowdhary
 
Mule accessing multiple database in parallel
Mule accessing multiple database in parallelMule accessing multiple database in parallel
Mule accessing multiple database in parallelAnirban Sen Chowdhary
 
Mule Groovy component
Mule Groovy componentMule Groovy component
Mule Groovy componentAnkush Sharma
 
Mule idempotent filter and Object Store
Mule idempotent filter and Object StoreMule idempotent filter and Object Store
Mule idempotent filter and Object StoreAnirban Sen Chowdhary
 
Calling flow from another application
Calling flow from another applicationCalling flow from another application
Calling flow from another applicationAnirban Sen Chowdhary
 

Viewers also liked (20)

Scheduling and monitoring with java in mule
Scheduling and monitoring with java in muleScheduling and monitoring with java in mule
Scheduling and monitoring with java in mule
 
Accessing Mule variables in groovy
Accessing Mule variables in groovyAccessing Mule variables in groovy
Accessing Mule variables in groovy
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 
Automatic documentation with mule
Automatic documentation with mule Automatic documentation with mule
Automatic documentation with mule
 
Mule accessing multiple database in parallel
Mule accessing multiple database in parallelMule accessing multiple database in parallel
Mule accessing multiple database in parallel
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Delaying jms with mule
Delaying jms with muleDelaying jms with mule
Delaying jms with mule
 
Sharing resources with mule
Sharing resources with muleSharing resources with mule
Sharing resources with mule
 
Combing xml in Mule
Combing xml in MuleCombing xml in Mule
Combing xml in Mule
 
Mule Groovy component
Mule Groovy componentMule Groovy component
Mule Groovy component
 
Timer Interceptor in Mule
Timer Interceptor in MuleTimer Interceptor in Mule
Timer Interceptor in Mule
 
Mule dynamic name space
Mule dynamic name spaceMule dynamic name space
Mule dynamic name space
 
Mule idempotent filter and Object Store
Mule idempotent filter and Object StoreMule idempotent filter and Object Store
Mule idempotent filter and Object Store
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Sending mail with attachment
Sending mail with attachmentSending mail with attachment
Sending mail with attachment
 
Calling flow from another application
Calling flow from another applicationCalling flow from another application
Calling flow from another application
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Running mule from java
Running mule from javaRunning mule from java
Running mule from java
 
Dynamic file attribute
Dynamic file attributeDynamic file attribute
Dynamic file attribute
 

Similar to Integrate Mule and ActiveMQ - Filter Messages by JMS Priority Using Groovy

Accessing jms by groovy
Accessing jms by groovyAccessing jms by groovy
Accessing jms by groovySon Nguyen
 
Simple http and jms for beginners
Simple http and jms for beginnersSimple http and jms for beginners
Simple http and jms for beginnersChristian Hipolito
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedurejaveed_mhd
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedureMohammed625
 
Stored procedure in mule
Stored procedure in muleStored procedure in mule
Stored procedure in muleManav Prasad
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standaloneAbdulImrankhan7
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalonejaveed_mhd
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in MuleKhasim Saheb
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standaloneMohammed625
 
Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalonemdfkhan625
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standaloneAnirban Sen Chowdhary
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community editionMohammed246
 
Cache for community edition
Cache for community edition Cache for community edition
Cache for community edition javeed_mhd
 
Cache for community edition
Cache for community edition Cache for community edition
Cache for community edition mdfkhan625
 
Cache for community edition
Cache for community edition Cache for community edition
Cache for community edition Khasim Saheb
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community editionF K
 
Cache community edition
Cache community edition Cache community edition
Cache community edition AbdulImrankhan7
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community editionirfan1008
 

Similar to Integrate Mule and ActiveMQ - Filter Messages by JMS Priority Using Groovy (20)

Accessing jms by groovy
Accessing jms by groovyAccessing jms by groovy
Accessing jms by groovy
 
Simple http and jms for beginners
Simple http and jms for beginnersSimple http and jms for beginners
Simple http and jms for beginners
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Mule stored procedure
Mule stored procedureMule stored procedure
Mule stored procedure
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Stored procedure in mule
Stored procedure in muleStored procedure in mule
Stored procedure in mule
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Deploying and running mule standalone
Deploying and running mule standaloneDeploying and running mule standalone
Deploying and running mule standalone
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 
Cache for community edition
Cache for community edition Cache for community edition
Cache for community edition
 
Cache for community edition
Cache for community edition Cache for community edition
Cache for community edition
 
Cache for community edition
Cache for community edition Cache for community edition
Cache for community edition
 
Community edition Cache
Community edition CacheCommunity edition Cache
Community edition Cache
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 
Cache community edition
Cache community edition Cache community edition
Cache community edition
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 

More from Anirban Sen Chowdhary

Overview in ringcentral digital line
Overview in ringcentral digital lineOverview in ringcentral digital line
Overview in ringcentral digital lineAnirban Sen Chowdhary
 
RingCentral application development overview
RingCentral application development overviewRingCentral application development overview
RingCentral application development overviewAnirban Sen Chowdhary
 
Overview on ring central errors part 4
Overview on ring central errors part 4Overview on ring central errors part 4
Overview on ring central errors part 4Anirban Sen Chowdhary
 
Setting up your ring central sandbox in steps
Setting up your ring central sandbox in stepsSetting up your ring central sandbox in steps
Setting up your ring central sandbox in stepsAnirban Sen Chowdhary
 
Overview on ring central errors: part 2
Overview on ring central errors: part 2Overview on ring central errors: part 2
Overview on ring central errors: part 2Anirban Sen Chowdhary
 
Call recording overview ring central
Call recording overview  ring centralCall recording overview  ring central
Call recording overview ring centralAnirban Sen Chowdhary
 
Ring central engaging with amazon alexa
Ring central engaging with amazon alexaRing central engaging with amazon alexa
Ring central engaging with amazon alexaAnirban Sen Chowdhary
 
How ring central sdk changing the game
How ring central sdk changing the gameHow ring central sdk changing the game
How ring central sdk changing the gameAnirban Sen Chowdhary
 
When ring central connect salesforce
When ring central connect salesforceWhen ring central connect salesforce
When ring central connect salesforceAnirban Sen Chowdhary
 
Ring central connecting salesforce overview
Ring central connecting salesforce overviewRing central connecting salesforce overview
Ring central connecting salesforce overviewAnirban Sen Chowdhary
 
Ring central call logs overview (part 2)
Ring central call logs overview (part 2)Ring central call logs overview (part 2)
Ring central call logs overview (part 2)Anirban Sen Chowdhary
 

More from Anirban Sen Chowdhary (20)

Change the game with Game changer
Change the game with Game changerChange the game with Game changer
Change the game with Game changer
 
Ring central desktop app overview
Ring central desktop app overviewRing central desktop app overview
Ring central desktop app overview
 
Overview in ringcentral digital line
Overview in ringcentral digital lineOverview in ringcentral digital line
Overview in ringcentral digital line
 
Some basics with ring central
Some basics with ring centralSome basics with ring central
Some basics with ring central
 
Ring central and python
Ring central and pythonRing central and python
Ring central and python
 
RingCentral application development overview
RingCentral application development overviewRingCentral application development overview
RingCentral application development overview
 
Cloze connect ringcentral
Cloze connect ringcentralCloze connect ringcentral
Cloze connect ringcentral
 
Overview on ring central errors part 4
Overview on ring central errors part 4Overview on ring central errors part 4
Overview on ring central errors part 4
 
Setting up your ring central sandbox in steps
Setting up your ring central sandbox in stepsSetting up your ring central sandbox in steps
Setting up your ring central sandbox in steps
 
Overview on ring central errors: part 2
Overview on ring central errors: part 2Overview on ring central errors: part 2
Overview on ring central errors: part 2
 
Overview on ring central errors
Overview on ring central errorsOverview on ring central errors
Overview on ring central errors
 
Call recording overview ring central
Call recording overview  ring centralCall recording overview  ring central
Call recording overview ring central
 
Ring central engaging with amazon alexa
Ring central engaging with amazon alexaRing central engaging with amazon alexa
Ring central engaging with amazon alexa
 
How ring central sdk changing the game
How ring central sdk changing the gameHow ring central sdk changing the game
How ring central sdk changing the game
 
When ring central connect salesforce
When ring central connect salesforceWhen ring central connect salesforce
When ring central connect salesforce
 
Mule 4 connecting ring central
Mule 4 connecting ring centralMule 4 connecting ring central
Mule 4 connecting ring central
 
Ring central sdk
Ring central sdkRing central sdk
Ring central sdk
 
Ring central with okta
Ring central with oktaRing central with okta
Ring central with okta
 
Ring central connecting salesforce overview
Ring central connecting salesforce overviewRing central connecting salesforce overview
Ring central connecting salesforce overview
 
Ring central call logs overview (part 2)
Ring central call logs overview (part 2)Ring central call logs overview (part 2)
Ring central call logs overview (part 2)
 

Integrate Mule and ActiveMQ - Filter Messages by JMS Priority 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 ….
  • 4.
  • 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 