SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Mule ESB 3.6
Java Messaging Services (JMS)
Prepared By: Rupesh Sinha
Overview
− Java Messaging Services (JMS)
− JMS Messaging model
− JMS backchannel
− Message filters in JMS
− JMS transformers in Mule
− Example configuration for ActiveMQ
Java Messaging Services (JMS)
• A message oriented middleware
• Supports creation of message based
applications
• Supports loosely coupled middleware
• Supports transactions
• Supports reliability
JMS Messaging Model
• JMS supports two models for messaging
− JMS Queue
− JMS Topic
JMS Queue
• Standard Queuing
• First In First Out (FIFO)
• Point to point i.e., single producer and single
consumer
• The behavior is similar to Mule VM queues
JMS Topic
• Enables publish and subscribe mechanism
• The model is similar to RSS feed
• Multiple subscribers can subscribe to a topic
• Supports publishing a message even if subscriber is
disconnected using durable attribute in mule JMS
Message Publisher
Message Subscriber 1 Message Subscriber 2 Message Subscriber N
JMS backchannel
• Backchannel allows response to be returned back in synchronous mule
message flow
• There are two ways to create backchannel in Mule
− Define your outbound endpoint with request-response exchange pattern
− Use a request-reply message processor
• Backchannel allows JMS endpoint to behave as two way channel
• It internally sets “reply-to” header that tells mule where to send a
response
Client Server
Channel
Backchannel
Transport
Message filter in JMS
• Mule supports selecting specific messages at
the consumers end by using JMS selector
• JMS selector can use JMS header properties
• Non matching messages remains in the queue
<jms:inbound-endpoint connector-ref="Active_MQ" doc:name="ActiveMQ" topic="TestTopic">
<jms:selector expression="JMSPriority=5" />
</jms:inbound-endpoint>
JMS transformers in Mule
• The default transformers applied to JMS endpoints are as
follows:
− inbound = JMSMessageToObject
− outbound = ObjectToJMSMessage
− response = ObjectToJMSMessage
• The transformation happens to/from as given below
JMS Type Java Type
javax.jms.TextMessage java.lang.String
javax.jms.ObjectMessage java.lang.Object
javax.jms.BytesMessage byte[]
javax.jms.MapMessage java.util.Map
javax.jms.StreamMessage java.io.InputStream
Example configuration for Active MQ
• Configuring a JMS connector using ActiveMQ
• Defining JMS outbound endpoint
• Defining JMS inbound endpoint
• The example configuration for JMS connector
and inbound/outbound endpoints are given in
coming slides and configuration is using a JMS
topic
Configuring a JMS connector using Active MQ
<jms:activemq-connector name="Active_MQ" specification="1.1" username="username"
password="password" brokerURL="tcp://host:port" validateConnections="true"
doc:name="Active MQ"/>
Defining JMS outbound endpoint
<jms:outbound-endpoint topic="TestTopic" connector-ref="Active_MQ" doc:name="JMS"/>
Defining JMS inbound endpoint
<jms:inbound-endpoint connector-ref="Active_MQ“ doc:name="ActiveMQ" topic="TestTopic"/>
For more details, please refer the MuleSoft reference document at below URL
http://www.mulesoft.org/documentation/display/current/JMS+Transport+Reference
Thanks for watching

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (17)

Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Mule Schema Validation Filter
Mule Schema Validation FilterMule Schema Validation Filter
Mule Schema Validation Filter
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
Mule LDAP Connector
Mule LDAP ConnectorMule LDAP Connector
Mule LDAP Connector
 
Mule Message Chunk Aggregator
Mule Message Chunk AggregatorMule Message Chunk Aggregator
Mule Message Chunk Aggregator
 
Mule Expression Transformer
Mule Expression TransformerMule Expression Transformer
Mule Expression Transformer
 
Mule overview
Mule overviewMule overview
Mule overview
 
Anypoint mq queues and exchanges
Anypoint mq queues and exchangesAnypoint mq queues and exchanges
Anypoint mq queues and exchanges
 
Mule esb introduction
Mule esb introductionMule esb introduction
Mule esb introduction
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule concepts filters scopes_routers
Mule concepts filters scopes_routersMule concepts filters scopes_routers
Mule concepts filters scopes_routers
 
Mule esb usecase
Mule esb usecaseMule esb usecase
Mule esb usecase
 
Mule Script Transformer
Mule Script TransformerMule Script Transformer
Mule Script Transformer
 
Mule scopes request_response_scope
Mule scopes request_response_scopeMule scopes request_response_scope
Mule scopes request_response_scope
 
Controlling Message Flow - Mule ESB
Controlling Message Flow - Mule ESBControlling Message Flow - Mule ESB
Controlling Message Flow - Mule ESB
 
Mule servlet connector
Mule servlet connectorMule servlet connector
Mule servlet connector
 
Mule overview-ppt
Mule overview-pptMule overview-ppt
Mule overview-ppt
 

Ähnlich wie Mule JMS Transport

Indianapolis mule soft_meetup_12_june_2021
Indianapolis mule soft_meetup_12_june_2021Indianapolis mule soft_meetup_12_june_2021
Indianapolis mule soft_meetup_12_june_2021
ikram_ahamed
 

Ähnlich wie Mule JMS Transport (20)

Introduction java messaging services
Introduction java messaging servicesIntroduction java messaging services
Introduction java messaging services
 
Jms introduction
Jms introductionJms introduction
Jms introduction
 
Mule jms
Mule   jmsMule   jms
Mule jms
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
 
Introduction tojms
Introduction tojmsIntroduction tojms
Introduction tojms
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
 
Synchronous jms in mule
Synchronous jms in muleSynchronous jms in mule
Synchronous jms in mule
 
Jms topics
Jms topicsJms topics
Jms topics
 
Mule with jms
Mule with jmsMule with jms
Mule with jms
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
Jms topics
Jms   topicsJms   topics
Jms topics
 
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
 
M messaging 2
M messaging 2M messaging 2
M messaging 2
 
Jms queue
Jms queueJms queue
Jms queue
 
Indianapolis mule soft_meetup_12_june_2021
Indianapolis mule soft_meetup_12_june_2021Indianapolis mule soft_meetup_12_june_2021
Indianapolis mule soft_meetup_12_june_2021
 
Mule JMS transport
Mule JMS transportMule JMS transport
Mule JMS transport
 
Jms queues
Jms queuesJms queues
Jms queues
 
Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
 
Mule requester
Mule requesterMule requester
Mule requester
 
About jms
About jmsAbout jms
About jms
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 

Mule JMS Transport

  • 1. Mule ESB 3.6 Java Messaging Services (JMS) Prepared By: Rupesh Sinha
  • 2. Overview − Java Messaging Services (JMS) − JMS Messaging model − JMS backchannel − Message filters in JMS − JMS transformers in Mule − Example configuration for ActiveMQ
  • 3. Java Messaging Services (JMS) • A message oriented middleware • Supports creation of message based applications • Supports loosely coupled middleware • Supports transactions • Supports reliability
  • 4. JMS Messaging Model • JMS supports two models for messaging − JMS Queue − JMS Topic
  • 5. JMS Queue • Standard Queuing • First In First Out (FIFO) • Point to point i.e., single producer and single consumer • The behavior is similar to Mule VM queues
  • 6. JMS Topic • Enables publish and subscribe mechanism • The model is similar to RSS feed • Multiple subscribers can subscribe to a topic • Supports publishing a message even if subscriber is disconnected using durable attribute in mule JMS Message Publisher Message Subscriber 1 Message Subscriber 2 Message Subscriber N
  • 7. JMS backchannel • Backchannel allows response to be returned back in synchronous mule message flow • There are two ways to create backchannel in Mule − Define your outbound endpoint with request-response exchange pattern − Use a request-reply message processor • Backchannel allows JMS endpoint to behave as two way channel • It internally sets “reply-to” header that tells mule where to send a response Client Server Channel Backchannel Transport
  • 8. Message filter in JMS • Mule supports selecting specific messages at the consumers end by using JMS selector • JMS selector can use JMS header properties • Non matching messages remains in the queue <jms:inbound-endpoint connector-ref="Active_MQ" doc:name="ActiveMQ" topic="TestTopic"> <jms:selector expression="JMSPriority=5" /> </jms:inbound-endpoint>
  • 9. JMS transformers in Mule • The default transformers applied to JMS endpoints are as follows: − inbound = JMSMessageToObject − outbound = ObjectToJMSMessage − response = ObjectToJMSMessage • The transformation happens to/from as given below JMS Type Java Type javax.jms.TextMessage java.lang.String javax.jms.ObjectMessage java.lang.Object javax.jms.BytesMessage byte[] javax.jms.MapMessage java.util.Map javax.jms.StreamMessage java.io.InputStream
  • 10. Example configuration for Active MQ • Configuring a JMS connector using ActiveMQ • Defining JMS outbound endpoint • Defining JMS inbound endpoint • The example configuration for JMS connector and inbound/outbound endpoints are given in coming slides and configuration is using a JMS topic
  • 11. Configuring a JMS connector using Active MQ <jms:activemq-connector name="Active_MQ" specification="1.1" username="username" password="password" brokerURL="tcp://host:port" validateConnections="true" doc:name="Active MQ"/>
  • 12. Defining JMS outbound endpoint <jms:outbound-endpoint topic="TestTopic" connector-ref="Active_MQ" doc:name="JMS"/>
  • 13. Defining JMS inbound endpoint <jms:inbound-endpoint connector-ref="Active_MQ“ doc:name="ActiveMQ" topic="TestTopic"/>
  • 14. For more details, please refer the MuleSoft reference document at below URL http://www.mulesoft.org/documentation/display/current/JMS+Transport+Reference