How to use JMS Inbound
endpoint
14-05-2015
Abstract
• The main motto of this PPT is How to use JMS
Inbound endpoint in our applications.
• JMS Outbound endpoint POC:
• http://www.slideshare.net/sivachandramanda
lapu/how-to-use-jms-outbound-endpoint
Introduction
• JMS (Java Message Service) is a widely-used
API for Message Oriented Middleware. It
allows communication between different
components of a distributed application to be
loosely coupled, reliable, and asynchronous.
Example
.mflow
• <?xml version="1.0" encoding="UTF-8"?>
•
• <mule xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
• xmlns:spring="http://www.springframework.org/schema/beans"
• xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
• xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-current.xsd
• http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
• http://www.mulesoft.org/schema/mule/jms
http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd">
• <jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616"
validateConnections="true" doc:name="Active MQ"/>
• <flow name="JMSInboundEndpointFlow">
• <jms:inbound-endpoint queue="myqueue" connector-ref="Active_MQ" doc:name="JMS"/>
• <logger message="--payload is:#[payload]--" level="INFO" doc:name="Logger"/>
• </flow>
• </mule>
• Output:
• INFO 2016-05-06 17:37:15,916 [main] org.mule.module.launcher.MuleDeploymentService:
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• + Started app 'JMSInboundEndpoint' +
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• INFO 2016-05-06 17:37:15,920 [main] org.mule.module.launcher.DeploymentDirectoryWatcher:
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• + Mule is up and kicking (every 5000ms) +
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• INFO 2016-05-06 17:37:18,993 [main] org.mule.module.launcher.StartupSummaryDeploymentListener:
• **********************************************************************
• * - - + DOMAIN + - - * - - + STATUS + - - *
• **********************************************************************
• * default * DEPLOYED *
• **********************************************************************
•
• *********************************************************************************************
**********
• * - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - *
• *********************************************************************************************
**********
• * JMSInboundEndpoint * default * DEPLOYED *
• *********************************************************************************************
**********
•
• INFO 2016-05-06 17:38:02,092 [[JMSInboundEndpoint].JMSInboundEndpointFlow.stage1.02]
org.mule.api.processor.LoggerMessageProcessor: --payload is:{ "Address":{ "Country":"India", "State":"AP",
"City":"Rajhamundry" } }--
• Flow of execution:
1. JMS Inbound endpoint automatically receives
the messages (dequeue) from “myqueue”.
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.6/jms-transport-reference

How to use jms inbound endpoint

  • 1.
    How to useJMS Inbound endpoint 14-05-2015
  • 2.
    Abstract • The mainmotto of this PPT is How to use JMS Inbound endpoint in our applications.
  • 3.
    • JMS Outboundendpoint POC: • http://www.slideshare.net/sivachandramanda lapu/how-to-use-jms-outbound-endpoint
  • 4.
    Introduction • JMS (JavaMessage Service) is a widely-used API for Message Oriented Middleware. It allows communication between different components of a distributed application to be loosely coupled, reliable, and asynchronous.
  • 5.
  • 6.
    .mflow • <?xml version="1.0"encoding="UTF-8"?> • • <mule xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" • xmlns:spring="http://www.springframework.org/schema/beans" • xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" • xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd • http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd"> • <jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ"/> • <flow name="JMSInboundEndpointFlow"> • <jms:inbound-endpoint queue="myqueue" connector-ref="Active_MQ" doc:name="JMS"/> • <logger message="--payload is:#[payload]--" level="INFO" doc:name="Logger"/> • </flow> • </mule>
  • 7.
    • Output: • INFO2016-05-06 17:37:15,916 [main] org.mule.module.launcher.MuleDeploymentService: • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • + Started app 'JMSInboundEndpoint' + • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • INFO 2016-05-06 17:37:15,920 [main] org.mule.module.launcher.DeploymentDirectoryWatcher: • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • + Mule is up and kicking (every 5000ms) + • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • INFO 2016-05-06 17:37:18,993 [main] org.mule.module.launcher.StartupSummaryDeploymentListener: • ********************************************************************** • * - - + DOMAIN + - - * - - + STATUS + - - * • ********************************************************************** • * default * DEPLOYED * • ********************************************************************** • • ********************************************************************************************* ********** • * - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - * • ********************************************************************************************* ********** • * JMSInboundEndpoint * default * DEPLOYED * • ********************************************************************************************* ********** • • INFO 2016-05-06 17:38:02,092 [[JMSInboundEndpoint].JMSInboundEndpointFlow.stage1.02] org.mule.api.processor.LoggerMessageProcessor: --payload is:{ "Address":{ "Country":"India", "State":"AP", "City":"Rajhamundry" } }--
  • 8.
    • Flow ofexecution: 1. JMS Inbound endpoint automatically receives the messages (dequeue) from “myqueue”.
  • 10.