SlideShare a Scribd company logo
By Anirban Sen Chowdhary
Mule ESB is one of the wonderful applications which easily gel with ActiveMQ. We
will get plenty of examples on internet that will show how to useActiveMQ with
Mule. But here I will demonstrate how use filter with ActiveMQ and Mule.
We can filter JMS messages on based on JMS properties like JMS priority, JMS Type
and Headers etc. We will first look into how we can filter JMS messages on based on
JMS priority and then with Header.
Now, we will start by creating a Mule flow which will send messages to the queue in
ActiveMQ with a customisable JMS priority. Let’s consider we will send messages to
the queue whose JMS priority will be say 9.
So, first we will create a Mule flow that will send messages to the queue of ActiveMQ.
Consider the following flow :-
<jms:activemq-connector name=“Active_MQ” numberOfConcurrentTransactedReceivers=“20”
brokerURL=“tcp://localhost:61616″/>
<flow name=“JMSSender” doc:name=“JMSSender”>
<http:inbound-endpoint exchange-pattern=“request-
response” host=“localhost”port=“8081” path=“jms” doc:name=“HTTP”/>
<logger message=“Payload :- #[message.payload]” level=“INFO” doc:name=“Logger”/>
<jms:outbound-endpoint queue=“MyQueue” connector-ref=“Active_MQ” doc:name=“JMS”>
</jms:outbound-endpoint>
</flow>
Now, if we hit the url :- http://localhost:8081/jms we will be sending
message payload to the queue MyQueue . Since we haven’t set any priority to
the message, it will be send to the queue with default priority 4 as follows:-
So, here we will be setting priority in our message payload. To set priority in our
payload we will be configuring it as following:-
<message-properties-transformer>
<add-message-property key=“Priority” value=“9”/>
</message-properties-transformer>
As you can see, we are trying to set the message priority to 9.
So, our entire flow configuration will be :-
<flow name=“JMSSender” doc:name=“JMSSender”>
<http:inbound-endpoint exchange-pattern=“request-
response” host=“localhost”port=“8081” path=“jms” doc:name=“HTTP”/>
<logger message=“Payload :- #[message.payload]” level=“INFO”doc:name=“Logger”/>
<jms:outbound-endpoint queue=“MyQueue” connector-ref=“Active_MQ”doc:name=“JMS”>
<message-properties-transformer>
<add-message-property key=“Priority” value=“9”/>
</message-properties-transformer>
</jms:outbound-endpoint>
</flow>
So, if you now again hit the url :- http://localhost:8081/jms the message will
now again pushed into the queue MyQueue but this time with priority 9 as
follows:-
Since we can define our own JMS priority to the messages that we push into the
queue, we can now consume the message from the queue based on the JMS
priority. That means we can now filter the message from queue based on JMS
priority.
So, here will be now creating a flow that will consume messages from JMS queue based
on priority. That means we will be consuming messages from queue MyQueue whose
JMS priority is 9. We will be using jms:selector here to filter JMS messages as follows :-
<flow name=“JMSReceiver” doc:name=“JMSReceiver”>
<jms:inbound-endpoint connector-ref=“Active_MQ” doc:name=“JMS” exchange-
pattern=“request-response” address=“jms://tcp:MyQueue”>
<jms:selector expression=“JMSPriority = 9”/>
</jms:inbound-endpoint>
<logger level=“INFO” message=“Received Payload :-#[message.payload]” doc:name=“Logger”/>
</flow>
Here, the flow is configured to consume only the JMS messages from the
queue MyQueue whose JMS priority is 9 and remaining messages will be ignored
as follows:-
Here you can see in the above that the messages with JMS priority 9 are consumed
while the remaining messages are left in the queue MyQueue .
In the similar way we can also configure the JMS messages by setting JMS header
as follows:-
<message-properties-transformer>
<add-message-property key=“Header” value=“Custom-Header” />
</message-properties-transformer>
And then consume it based on the Header:-
<jms:inbound-endpoint connector-ref=“Active_MQ” doc:name=“JMS”exchange-
pattern=“request-response” address=“jms://tcp:MyQueue”>
<jms:selector expression=“Header = ‘Custom-Header'”/>
</jms:inbound-endpoint>
So here messages from queue will be consumed only if its header is ‘Custom-
Header’
I hope I am clear enough to demonstrate the way to configure JMS
messages with JMS properties and consuming the messages based on
the properties by applying filters.
Now, you can experiment your own way and configure JMS messages
and implement the example .
Filtering jms messages with mule

More Related Content

What's hot

MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleys
Angel Alberici
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Manish Kumar Yadav
 
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
Jitendra Bafna
 
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Gaurav Sethi
 
MuleSoft Anypoint Platform and Three Tier Architecture
MuleSoft Anypoint  Platform and Three Tier ArchitectureMuleSoft Anypoint  Platform and Three Tier Architecture
MuleSoft Anypoint Platform and Three Tier Architecture
Harish Kumar
 
Custom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker exampleCustom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker example
Royston Lobo
 
How To Install Sonar Qube Plugin In Anypoint Studio
How To Install Sonar Qube Plugin In Anypoint StudioHow To Install Sonar Qube Plugin In Anypoint Studio
How To Install Sonar Qube Plugin In Anypoint Studio
Sudha Ch
 
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain. What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
Kellton Tech Solutions Ltd
 
Mule Common Logging & Error Handling Framework
Mule Common Logging & Error Handling FrameworkMule Common Logging & Error Handling Framework
Mule Common Logging & Error Handling Framework
Vijay Reddy
 
MuleSoft Architecture Presentation
MuleSoft Architecture PresentationMuleSoft Architecture Presentation
MuleSoft Architecture Presentation
Rupesh Sinha
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnit
Jimmy Attia
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQ
Knoldus Inc.
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
Alexandra N. Martinez
 
Introduction à la plateforme Anypoint de MuleSoft
Introduction à la plateforme Anypoint de MuleSoftIntroduction à la plateforme Anypoint de MuleSoft
Introduction à la plateforme Anypoint de MuleSoft
Paris Salesforce Developer Group
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
Naukri.com
 
Why Mulesoft ?
Why Mulesoft ?Why Mulesoft ?
Why Mulesoft ?
Bui Kiet
 
Managing APIs with MuleSoft
Managing APIs with MuleSoftManaging APIs with MuleSoft
Managing APIs with MuleSoft
Guilherme Pereira Silva
 
Error Handling in Mulesoft
Error Handling in MulesoftError Handling in Mulesoft
Error Handling in Mulesoft
Amit Singh
 
Cloudhub 2.0
Cloudhub 2.0Cloudhub 2.0
Cloudhub 2.0
Christopher Co
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
Ilias Okacha
 

What's hot (20)

MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleys
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
 
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
MuleSoft Surat Virtual Meetup#25 - Anypoint Platform Features and Capabilitie...
 
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
 
MuleSoft Anypoint Platform and Three Tier Architecture
MuleSoft Anypoint  Platform and Three Tier ArchitectureMuleSoft Anypoint  Platform and Three Tier Architecture
MuleSoft Anypoint Platform and Three Tier Architecture
 
Custom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker exampleCustom policies in mule 4 and a circuit breaker example
Custom policies in mule 4 and a circuit breaker example
 
How To Install Sonar Qube Plugin In Anypoint Studio
How To Install Sonar Qube Plugin In Anypoint StudioHow To Install Sonar Qube Plugin In Anypoint Studio
How To Install Sonar Qube Plugin In Anypoint Studio
 
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain. What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
 
Mule Common Logging & Error Handling Framework
Mule Common Logging & Error Handling FrameworkMule Common Logging & Error Handling Framework
Mule Common Logging & Error Handling Framework
 
MuleSoft Architecture Presentation
MuleSoft Architecture PresentationMuleSoft Architecture Presentation
MuleSoft Architecture Presentation
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnit
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQ
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
 
Introduction à la plateforme Anypoint de MuleSoft
Introduction à la plateforme Anypoint de MuleSoftIntroduction à la plateforme Anypoint de MuleSoft
Introduction à la plateforme Anypoint de MuleSoft
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
Why Mulesoft ?
Why Mulesoft ?Why Mulesoft ?
Why Mulesoft ?
 
Managing APIs with MuleSoft
Managing APIs with MuleSoftManaging APIs with MuleSoft
Managing APIs with MuleSoft
 
Error Handling in Mulesoft
Error Handling in MulesoftError Handling in Mulesoft
Error Handling in Mulesoft
 
Cloudhub 2.0
Cloudhub 2.0Cloudhub 2.0
Cloudhub 2.0
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
 

Viewers also liked

Mule idempotent filter and Object Store
Mule idempotent filter and Object StoreMule idempotent filter and Object Store
Mule idempotent filter and Object Store
Anirban Sen Chowdhary
 
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
Anirban Sen Chowdhary
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Running mule from java
Running mule from javaRunning mule from java
Running mule from java
Anirban Sen Chowdhary
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
Rupesh Sinha
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
Gandham38
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
Anirban Sen Chowdhary
 
Automatic documentation with mule
Automatic documentation with mule Automatic documentation with mule
Automatic documentation with mule
Anirban Sen Chowdhary
 
Mule accessing multiple database in parallel
Mule accessing multiple database in parallelMule accessing multiple database in parallel
Mule accessing multiple database in parallel
Anirban Sen Chowdhary
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2
Anirban Sen Chowdhary
 
Dealing with store the objectstore
Dealing with store the objectstoreDealing with store the objectstore
Dealing with store the objectstore
Anirban Sen Chowdhary
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Mule with composite source
Mule with composite sourceMule with composite source
Mule with composite source
Anirban Sen Chowdhary
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
Son Nguyen
 
Combing xml in Mule
Combing xml in MuleCombing xml in Mule
Combing xml in Mule
Anirban Sen Chowdhary
 
Sharing resources with mule
Sharing resources with muleSharing resources with mule
Sharing resources with mule
Anirban Sen Chowdhary
 
Delaying jms with mule
Delaying jms with muleDelaying jms with mule
Delaying jms with mule
Anirban Sen Chowdhary
 
Mule Groovy component
Mule Groovy componentMule Groovy component
Mule Groovy component
Ankush Sharma
 
Timer Interceptor in Mule
Timer Interceptor in MuleTimer Interceptor in Mule
Timer Interceptor in Mule
Anirban Sen Chowdhary
 

Viewers also liked (20)

Mule idempotent filter and Object Store
Mule idempotent filter and Object StoreMule idempotent filter and Object Store
Mule idempotent filter and Object Store
 
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 jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Running mule from java
Running mule from javaRunning mule from java
Running mule from java
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
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
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2
 
Dealing with store the objectstore
Dealing with store the objectstoreDealing with store the objectstore
Dealing with store the objectstore
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Mule with composite source
Mule with composite sourceMule with composite source
Mule with composite source
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 
Combing xml in Mule
Combing xml in MuleCombing xml in Mule
Combing xml in Mule
 
Sharing resources with mule
Sharing resources with muleSharing resources with mule
Sharing resources with mule
 
Delaying jms with mule
Delaying jms with muleDelaying jms with mule
Delaying jms with 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
 

Similar to Filtering jms messages with mule

Filter messages
Filter messagesFilter messages
Filter messages
Son Nguyen
 
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
sivachandra mandalapu
 
Using groovy in mule
Using groovy in muleUsing groovy in mule
Using groovy in mule
Son Nguyen
 
Accessing jms by groovy
Accessing jms by groovyAccessing jms by groovy
Accessing jms by groovy
Son Nguyen
 
Jms queues
Jms queuesJms queues
Jms queues
Karnam Karthik
 
JMS Backchannel
JMS BackchannelJMS Backchannel
JMS Backchannel
Rupesh Sinha
 
Mule jms
Mule   jmsMule   jms
M messaging 2
M messaging 2M messaging 2
M messaging 2
Vasanthii Chowdary
 
Jms topics
Jms topicsJms topics
Jms topics
Ravinder Singh
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
Gandham38
 
Jms queue
Jms queueJms queue
Jms queue
Son Nguyen
 
Request in mule
Request in muleRequest in mule
Request in mule
Son Nguyen
 
Mule with jms
Mule with jmsMule with jms
Mule with jms
kiranvanga
 
Mule requesterdemo
Mule requesterdemoMule requesterdemo
Mule requesterdemo
Anirban Sen Chowdhary
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
Ramakrishna Narkedamilli
 
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ ConfigurationAshish Mishra
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
D.Rajesh Kumar
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
D.Rajesh Kumar
 
Validate Soap Request in Mule
Validate Soap Request in MuleValidate Soap Request in Mule
Validate Soap Request in Mule
irfan1008
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
Vasanthii Chowdary
 

Similar to Filtering jms messages with mule (20)

Filter messages
Filter messagesFilter messages
Filter messages
 
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
 
Using groovy in mule
Using groovy in muleUsing groovy in mule
Using groovy in mule
 
Accessing jms by groovy
Accessing jms by groovyAccessing jms by groovy
Accessing jms by groovy
 
Jms queues
Jms queuesJms queues
Jms queues
 
JMS Backchannel
JMS BackchannelJMS Backchannel
JMS Backchannel
 
Mule jms
Mule   jmsMule   jms
Mule jms
 
M messaging 2
M messaging 2M messaging 2
M messaging 2
 
Jms topics
Jms topicsJms topics
Jms topics
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
 
Jms queue
Jms queueJms queue
Jms queue
 
Request in mule
Request in muleRequest in mule
Request in mule
 
Mule with jms
Mule with jmsMule with jms
Mule with jms
 
Mule requesterdemo
Mule requesterdemoMule requesterdemo
Mule requesterdemo
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
 
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ Configuration
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
 
Soap in mule
Soap in muleSoap in mule
Soap in mule
 
Validate Soap Request in Mule
Validate Soap Request in MuleValidate Soap Request in Mule
Validate Soap Request in Mule
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
 

More from Anirban Sen Chowdhary

Change the game with Game changer
Change the game with Game changerChange the game with Game changer
Change the game with Game changer
Anirban Sen Chowdhary
 
Ring central desktop app overview
Ring central desktop app overviewRing central desktop app overview
Ring central desktop app overview
Anirban Sen Chowdhary
 
Overview in ringcentral digital line
Overview in ringcentral digital lineOverview in ringcentral digital line
Overview in ringcentral digital line
Anirban Sen Chowdhary
 
Some basics with ring central
Some basics with ring centralSome basics with ring central
Some basics with ring central
Anirban Sen Chowdhary
 
Ring central and python
Ring central and pythonRing central and python
Ring central and python
Anirban Sen Chowdhary
 
RingCentral application development overview
RingCentral application development overviewRingCentral application development overview
RingCentral application development overview
Anirban Sen Chowdhary
 
Cloze connect ringcentral
Cloze connect ringcentralCloze connect ringcentral
Cloze connect ringcentral
Anirban 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 4
Anirban 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 steps
Anirban 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 2
Anirban Sen Chowdhary
 
Overview on ring central errors
Overview on ring central errorsOverview on ring central errors
Overview on ring central errors
Anirban Sen Chowdhary
 
Call recording overview ring central
Call recording overview  ring centralCall recording overview  ring central
Call recording overview ring central
Anirban Sen Chowdhary
 
Ring central engaging with amazon alexa
Ring central engaging with amazon alexaRing central engaging with amazon alexa
Ring central engaging with amazon alexa
Anirban 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 game
Anirban Sen Chowdhary
 
When ring central connect salesforce
When ring central connect salesforceWhen ring central connect salesforce
When ring central connect salesforce
Anirban Sen Chowdhary
 
Mule 4 connecting ring central
Mule 4 connecting ring centralMule 4 connecting ring central
Mule 4 connecting ring central
Anirban Sen Chowdhary
 
Ring central sdk
Ring central sdkRing central sdk
Ring central sdk
Anirban Sen Chowdhary
 
Ring central with okta
Ring central with oktaRing central with okta
Ring central with okta
Anirban Sen Chowdhary
 
Ring central connecting salesforce overview
Ring central connecting salesforce overviewRing central connecting salesforce overview
Ring central connecting salesforce overview
Anirban 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)
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 

Filtering jms messages with mule

  • 1. By Anirban Sen Chowdhary
  • 2. Mule ESB is one of the wonderful applications which easily gel with ActiveMQ. We will get plenty of examples on internet that will show how to useActiveMQ with Mule. But here I will demonstrate how use filter with ActiveMQ and Mule.
  • 3. We can filter JMS messages on based on JMS properties like JMS priority, JMS Type and Headers etc. We will first look into how we can filter JMS messages on based on JMS priority and then with Header.
  • 4. Now, we will start by creating a Mule flow which will send messages to the queue in ActiveMQ with a customisable JMS priority. Let’s consider we will send messages to the queue whose JMS priority will be say 9.
  • 5. So, first we will create a Mule flow that will send messages to the queue of ActiveMQ. Consider the following flow :- <jms:activemq-connector name=“Active_MQ” numberOfConcurrentTransactedReceivers=“20” brokerURL=“tcp://localhost:61616″/> <flow name=“JMSSender” doc:name=“JMSSender”> <http:inbound-endpoint exchange-pattern=“request- response” host=“localhost”port=“8081” path=“jms” doc:name=“HTTP”/> <logger message=“Payload :- #[message.payload]” level=“INFO” doc:name=“Logger”/> <jms:outbound-endpoint queue=“MyQueue” connector-ref=“Active_MQ” doc:name=“JMS”> </jms:outbound-endpoint> </flow>
  • 6. Now, if we hit the url :- http://localhost:8081/jms we will be sending message payload to the queue MyQueue . Since we haven’t set any priority to the message, it will be send to the queue with default priority 4 as follows:-
  • 7. So, here we will be setting priority in our message payload. To set priority in our payload we will be configuring it as following:- <message-properties-transformer> <add-message-property key=“Priority” value=“9”/> </message-properties-transformer> As you can see, we are trying to set the message priority to 9.
  • 8. So, our entire flow configuration will be :- <flow name=“JMSSender” doc:name=“JMSSender”> <http:inbound-endpoint exchange-pattern=“request- response” host=“localhost”port=“8081” path=“jms” doc:name=“HTTP”/> <logger message=“Payload :- #[message.payload]” level=“INFO”doc:name=“Logger”/> <jms:outbound-endpoint queue=“MyQueue” connector-ref=“Active_MQ”doc:name=“JMS”> <message-properties-transformer> <add-message-property key=“Priority” value=“9”/> </message-properties-transformer> </jms:outbound-endpoint> </flow>
  • 9. So, if you now again hit the url :- http://localhost:8081/jms the message will now again pushed into the queue MyQueue but this time with priority 9 as follows:-
  • 10. Since we can define our own JMS priority to the messages that we push into the queue, we can now consume the message from the queue based on the JMS priority. That means we can now filter the message from queue based on JMS priority.
  • 11. So, here will be now creating a flow that will consume messages from JMS queue based on priority. That means we will be consuming messages from queue MyQueue whose JMS priority is 9. We will be using jms:selector here to filter JMS messages as follows :- <flow name=“JMSReceiver” doc:name=“JMSReceiver”> <jms:inbound-endpoint connector-ref=“Active_MQ” doc:name=“JMS” exchange- pattern=“request-response” address=“jms://tcp:MyQueue”> <jms:selector expression=“JMSPriority = 9”/> </jms:inbound-endpoint> <logger level=“INFO” message=“Received Payload :-#[message.payload]” doc:name=“Logger”/> </flow>
  • 12. Here, the flow is configured to consume only the JMS messages from the queue MyQueue whose JMS priority is 9 and remaining messages will be ignored as follows:- Here you can see in the above that the messages with JMS priority 9 are consumed while the remaining messages are left in the queue MyQueue .
  • 13. In the similar way we can also configure the JMS messages by setting JMS header as follows:- <message-properties-transformer> <add-message-property key=“Header” value=“Custom-Header” /> </message-properties-transformer> And then consume it based on the Header:- <jms:inbound-endpoint connector-ref=“Active_MQ” doc:name=“JMS”exchange- pattern=“request-response” address=“jms://tcp:MyQueue”> <jms:selector expression=“Header = ‘Custom-Header'”/> </jms:inbound-endpoint> So here messages from queue will be consumed only if its header is ‘Custom- Header’
  • 14. I hope I am clear enough to demonstrate the way to configure JMS messages with JMS properties and consuming the messages based on the properties by applying filters. Now, you can experiment your own way and configure JMS messages and implement the example .