how to use jms inbound endpoint

10
How to use JMS Inbound endpoint 14-05-2015

Upload: sivachandra-mandalapu

Post on 12-Jan-2017

210 views

Category:

Education


3 download

TRANSCRIPT

Page 1: How to use jms inbound endpoint

How to use JMS Inbound endpoint

14-05-2015

Page 2: How to use jms inbound endpoint

Abstract

• The main motto of this PPT is How to use JMS Inbound endpoint in our applications.

Page 4: How to use jms inbound 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.

Page 5: How to use jms inbound endpoint

Example

Page 6: How to use jms inbound endpoint

.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>

Page 7: How to use jms inbound endpoint

• 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" } }--

Page 8: How to use jms inbound endpoint

• Flow of execution:1. JMS Inbound endpoint automatically receives the messages (dequeue) from “myqueue”.

Page 9: How to use jms inbound endpoint