SlideShare a Scribd company logo
Implementing JMS
backchannel
Prepared By: Rupesh Sinha
Overview
• What is JMS backchannel?
• Implementing JMS backchannel using request-
response JMS outbound and inbound endpoints
• Implementing JMS backchannel using request-reply
message processor
• Testing and observations
• Request-response Vs Request-reply approach
• Conclusion
What is JMS backchannel?
− Java Messaging Service are used mostly for
asynchronous communication between client and
server. Mule ESB allows using JMS for synchronous
communication where client and server can be
decoupled completely.
− JMS synchronous communication is also referred
to as “Backchannel”.
− JMS backchannel is not provided automatically by
the JMS protocol or any JMS brokers. Backchannel
must be implemented by the applications.
Implementing JMS backchannel
• Mule ESB supports two ways to
implement synchronous messaging
between client and server using JMS
− Using request-response JMS outbound and
inbound endpoints
− Using request-reply message processor
Active MQ Connector Configuration
 Click on Global Elements tab in your main flow
 Click on Create Button
 Select Active MQ (type Active MQ in the Filter
textbox to easily find Active MQ connector)
 Add Broker URL, User Name & Password
 Click on OK
 A sample screen and XML configuration is shown in
the next slide
Implementing backchannel using request-response
JMS outbound and inbound endpoints
 Request-response JMS endpoints internally creates a temporary
response queue for JMS backchannel
 The response is sent to client via the temporary queue
 The response queue is anonymous and Mule automatically sets the
JMS_REPLY_TO property. This property instructs mule where to send
reply message
 The response queue is created for every message exchange and is
destroyed immediately after response is received by the client
 JMSCorrelationId ensures proper sequencing
Client Flow
Server Flow
Implementing backchannel using request-
reply message processor
 JMS outbound and inbound endpoints are nested in
the request-reply message processor
 Sends requests to target queue through JMS
outbound-endpoint
 Receives responses through the JMS inbound-
endpoint
 Both request and response queues are explicitly
specified and are named queues
 JMSCorrelationId ensures proper sequencing
Client Flow
Server Flow
Testing and observations
 Open a browser and hit the below URL
http://localhost:1111/backchannel
 This will invoke the “jmsmessagepublisher” flow and will send a
message to request queue
 “Jmsmessagereceiver” queue will log the request message received
and will return a new message
 “Jmsmessagepublisher” flow will receive the message returned from
the “Jmsmessagereceiver” queue and will log the final response
 The final response will be printed on the browser
 If using request-response JMS endpoints and running in INFO mode, you
will observe the temporary queue and correlation id logged in logs
Request-Response Vs Request-Reply
backchannel
 Request-Response is exchange pattern whereas Request-Reply is a message
processor in Mule
 Request-Response based backchannel is useful if message has to be sent and
received on the same queue whereas Request-Reply based backchannel is
useful if you have two different queues for sending and receiving messages
 Request-Response approach creates a temporary queue for synchronous
communication between client and server whereas Request-Reply approach
uses two named queues
 Request-Response approach creates and destroys the temporary queue for
every message exchange and hence consumes additional CPU cycles and
memory compared to Request-Reply based implementation
 Request-Response approach can become a performance and resource
utilization concern
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

More Related Content

What's hot

Do we need JMS in 21st century?
Do we need JMS in 21st century?Do we need JMS in 21st century?
Do we need JMS in 21st century?
Mikalai Alimenkou
 
Mule LDAP Connector
Mule LDAP ConnectorMule LDAP Connector
Mule LDAP Connector
Ankush Sharma
 
Mule overview
Mule overviewMule overview
Mule overview
F K
 
Mule jms
Mule   jmsMule   jms
Mule Expression Transformer
Mule Expression TransformerMule Expression Transformer
Mule Expression Transformer
Ankush Sharma
 
Mule Schema Validation Filter
Mule Schema Validation FilterMule Schema Validation Filter
Mule Schema Validation Filter
Ankush Sharma
 
Mule: Java Component
Mule: Java ComponentMule: Java Component
Mule: Java Component
Sulthony Hartanto
 
Mule JMS transport
Mule JMS transportMule JMS transport
Mule JMS transport
Ankush Sharma
 
Mule threading profile & processing strategy
Mule threading profile & processing strategyMule threading profile & processing strategy
Mule threading profile & processing strategy
chetan singhal
 
Mule TCP Component
Mule TCP ComponentMule TCP Component
Mule TCP Component
Ankush Sharma
 
Muletransformers
MuletransformersMuletransformers
Muletransformers
vijaynerd
 
Mule esb introduction
Mule esb introductionMule esb introduction
Mule esb introduction
Praneethchampion
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flow
Son Nguyen
 
Mule concepts filters scopes_routers
Mule concepts filters scopes_routersMule concepts filters scopes_routers
Mule concepts filters scopes_routers
kunal vishe
 
Message structure
Message structureMessage structure
Message structure
Son Nguyen
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
Vasanthii Chowdary
 
Anypoint mq queues and exchanges
Anypoint mq queues and exchangesAnypoint mq queues and exchanges
Anypoint mq queues and exchanges
Son Nguyen
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In ActionBruce Snyder
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011Bruce Snyder
 
Spring JMS and ActiveMQ
Spring JMS and ActiveMQSpring JMS and ActiveMQ
Spring JMS and ActiveMQ
Geert Pante
 

What's hot (20)

Do we need JMS in 21st century?
Do we need JMS in 21st century?Do we need JMS in 21st century?
Do we need JMS in 21st century?
 
Mule LDAP Connector
Mule LDAP ConnectorMule LDAP Connector
Mule LDAP Connector
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule jms
Mule   jmsMule   jms
Mule jms
 
Mule Expression Transformer
Mule Expression TransformerMule Expression Transformer
Mule Expression Transformer
 
Mule Schema Validation Filter
Mule Schema Validation FilterMule Schema Validation Filter
Mule Schema Validation Filter
 
Mule: Java Component
Mule: Java ComponentMule: Java Component
Mule: Java Component
 
Mule JMS transport
Mule JMS transportMule JMS transport
Mule JMS transport
 
Mule threading profile & processing strategy
Mule threading profile & processing strategyMule threading profile & processing strategy
Mule threading profile & processing strategy
 
Mule TCP Component
Mule TCP ComponentMule TCP Component
Mule TCP Component
 
Muletransformers
MuletransformersMuletransformers
Muletransformers
 
Mule esb introduction
Mule esb introductionMule esb introduction
Mule esb introduction
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flow
 
Mule concepts filters scopes_routers
Mule concepts filters scopes_routersMule concepts filters scopes_routers
Mule concepts filters scopes_routers
 
Message structure
Message structureMessage structure
Message structure
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
 
Anypoint mq queues and exchanges
Anypoint mq queues and exchangesAnypoint mq queues and exchanges
Anypoint mq queues and exchanges
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In Action
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011
 
Spring JMS and ActiveMQ
Spring JMS and ActiveMQSpring JMS and ActiveMQ
Spring JMS and ActiveMQ
 

Similar to JMS Backchannel

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
 
Synchronous jms in mule
Synchronous jms in muleSynchronous jms in mule
Synchronous jms in mule
charle819
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
Gandham38
 
Jms topics
Jms topicsJms topics
Jms topics
Ravinder Singh
 
Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
Anirban Sen Chowdhary
 
Jms queues
Jms queuesJms queues
Jms queues
Karnam Karthik
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
Gandham38
 
M messaging 2
M messaging 2M messaging 2
M messaging 2
Vasanthii Chowdary
 
Jms
JmsJms
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ ConfigurationAshish Mishra
 
Jms intro
Jms introJms intro
Jms intro
Manav Prasad
 
Apache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache CamelApache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache CamelOmi Om
 
Filter messages
Filter messagesFilter messages
Filter messages
Son Nguyen
 
Jms topics
Jms   topicsJms   topics
Jms topics
Karnam Karthik
 
JMS Introduction
JMS IntroductionJMS Introduction
JMS IntroductionAlex Su
 
Mule with jms
Mule with jmsMule with jms
Mule with jms
kiranvanga
 
About jms
About jmsAbout jms
About jms
prudhvivreddy
 
Understanding JMS Integration Patterns
Understanding JMS Integration Patterns Understanding JMS Integration Patterns
Understanding JMS Integration Patterns WSO2
 
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
 
Spring JMS
Spring JMSSpring JMS
Spring JMS
Emprovise
 

Similar to JMS Backchannel (20)

Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
 
Synchronous jms in mule
Synchronous jms in muleSynchronous jms in mule
Synchronous jms in mule
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
 
Jms topics
Jms topicsJms topics
Jms topics
 
Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
 
Jms queues
Jms queuesJms queues
Jms queues
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
M messaging 2
M messaging 2M messaging 2
M messaging 2
 
Jms
JmsJms
Jms
 
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ Configuration
 
Jms intro
Jms introJms intro
Jms intro
 
Apache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache CamelApache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache Camel
 
Filter messages
Filter messagesFilter messages
Filter messages
 
Jms topics
Jms   topicsJms   topics
Jms topics
 
JMS Introduction
JMS IntroductionJMS Introduction
JMS Introduction
 
Mule with jms
Mule with jmsMule with jms
Mule with jms
 
About jms
About jmsAbout jms
About jms
 
Understanding JMS Integration Patterns
Understanding JMS Integration Patterns Understanding JMS Integration Patterns
Understanding JMS Integration Patterns
 
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
 
Spring JMS
Spring JMSSpring JMS
Spring JMS
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

JMS Backchannel

  • 2. Overview • What is JMS backchannel? • Implementing JMS backchannel using request- response JMS outbound and inbound endpoints • Implementing JMS backchannel using request-reply message processor • Testing and observations • Request-response Vs Request-reply approach • Conclusion
  • 3. What is JMS backchannel? − Java Messaging Service are used mostly for asynchronous communication between client and server. Mule ESB allows using JMS for synchronous communication where client and server can be decoupled completely. − JMS synchronous communication is also referred to as “Backchannel”. − JMS backchannel is not provided automatically by the JMS protocol or any JMS brokers. Backchannel must be implemented by the applications.
  • 4. Implementing JMS backchannel • Mule ESB supports two ways to implement synchronous messaging between client and server using JMS − Using request-response JMS outbound and inbound endpoints − Using request-reply message processor
  • 5. Active MQ Connector Configuration  Click on Global Elements tab in your main flow  Click on Create Button  Select Active MQ (type Active MQ in the Filter textbox to easily find Active MQ connector)  Add Broker URL, User Name & Password  Click on OK  A sample screen and XML configuration is shown in the next slide
  • 6.
  • 7. Implementing backchannel using request-response JMS outbound and inbound endpoints  Request-response JMS endpoints internally creates a temporary response queue for JMS backchannel  The response is sent to client via the temporary queue  The response queue is anonymous and Mule automatically sets the JMS_REPLY_TO property. This property instructs mule where to send reply message  The response queue is created for every message exchange and is destroyed immediately after response is received by the client  JMSCorrelationId ensures proper sequencing
  • 10. Implementing backchannel using request- reply message processor  JMS outbound and inbound endpoints are nested in the request-reply message processor  Sends requests to target queue through JMS outbound-endpoint  Receives responses through the JMS inbound- endpoint  Both request and response queues are explicitly specified and are named queues  JMSCorrelationId ensures proper sequencing
  • 13. Testing and observations  Open a browser and hit the below URL http://localhost:1111/backchannel  This will invoke the “jmsmessagepublisher” flow and will send a message to request queue  “Jmsmessagereceiver” queue will log the request message received and will return a new message  “Jmsmessagepublisher” flow will receive the message returned from the “Jmsmessagereceiver” queue and will log the final response  The final response will be printed on the browser  If using request-response JMS endpoints and running in INFO mode, you will observe the temporary queue and correlation id logged in logs
  • 14. Request-Response Vs Request-Reply backchannel  Request-Response is exchange pattern whereas Request-Reply is a message processor in Mule  Request-Response based backchannel is useful if message has to be sent and received on the same queue whereas Request-Reply based backchannel is useful if you have two different queues for sending and receiving messages  Request-Response approach creates a temporary queue for synchronous communication between client and server whereas Request-Reply approach uses two named queues  Request-Response approach creates and destroys the temporary queue for every message exchange and hence consumes additional CPU cycles and memory compared to Request-Reply based implementation  Request-Response approach can become a performance and resource utilization concern
  • 15. For more details, please refer the MuleSoft reference document at below URL http://www.mulesoft.org/documentation/display/current/JMS+Transport+Reference