SlideShare a Scribd company logo
1 of 12
Filter
Messages
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.
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 .

More Related Content

Viewers also liked

Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in muleShahid Shaik
 
Deployment application by mmc
Deployment application by mmcDeployment application by mmc
Deployment application by mmcSon Nguyen
 
The anypoint platform for API's
The anypoint platform for API'sThe anypoint platform for API's
The anypoint platform for API'sAchyuta Lakshmi
 

Viewers also liked (6)

Mule management console
Mule management consoleMule management console
Mule management console
 
Mule management console
Mule management consoleMule management console
Mule management console
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Mule Webservices
Mule WebservicesMule Webservices
Mule Webservices
 
Deployment application by mmc
Deployment application by mmcDeployment application by mmc
Deployment application by mmc
 
The anypoint platform for API's
The anypoint platform for API'sThe anypoint platform for API's
The anypoint platform for API's
 

Similar to Filter messages (20)

Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
 
Jms topics
Jms topicsJms topics
Jms topics
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
 
JMS Backchannel
JMS BackchannelJMS Backchannel
JMS Backchannel
 
Jms queues
Jms queuesJms queues
Jms queues
 
Request in mule
Request in muleRequest in mule
Request in mule
 
Spring JMS
Spring JMSSpring JMS
Spring JMS
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
 
Jms topics
Jms   topicsJms   topics
Jms topics
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
M messaging 2
M messaging 2M messaging 2
M messaging 2
 
Jms queue
Jms queueJms queue
Jms queue
 
Jms introduction
Jms introductionJms introduction
Jms introduction
 
Mule jms
Mule   jmsMule   jms
Mule jms
 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor 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
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Using groovy in mule
Using groovy in muleUsing groovy in mule
Using groovy in mule
 

More from Son Nguyen

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introductionSon Nguyen
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with muleSon Nguyen
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overviewSon Nguyen
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filterSon Nguyen
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in muleSon Nguyen
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with muleSon Nguyen
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in muleSon Nguyen
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in muleSon Nguyen
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weaveSon Nguyen
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler muleSon Nguyen
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-boundSon Nguyen
 
Batch job processing
Batch job processingBatch job processing
Batch job processingSon Nguyen
 
Using message enricher
Using message enricherUsing message enricher
Using message enricherSon Nguyen
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with muleSon Nguyen
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connectionSon Nguyen
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in muleSon Nguyen
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoftSon Nguyen
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectorsSon Nguyen
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introductionSon Nguyen
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in muleSon Nguyen
 

More from Son Nguyen (20)

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 

Recently uploaded

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Filter messages

  • 2. 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.
  • 3. 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>
  • 4. 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:-
  • 5. 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.
  • 6. 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>
  • 7. 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:-
  • 8. 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.
  • 9. 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>
  • 10. 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 .
  • 11. 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’
  • 12. 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 .