All docs This doc
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The WSO2 ESB JMS inbound protocol is a multi-tenant capable alternative to the WSO2 ESB JMS transport. The JMS inbound protocol implementation requires an active JMS server instance to be able to receive messages, and you need to place the client JARs for your JMS server in the ESB classpath. The recommended JMS server is Apache ActiveMQ, but other implementations such as Apache Qpid and Tibco are also supported.

To configure the JMS inbound protocol with ActiveMQ, see Configure the JMS Inbound Protocol with ActiveMQ.

Configuration parameters for a JMS inbound endpoint are XML fragments that represent JMS connection factories.

Following is a sample JMS inbound endpoint configuration:

<inboundEndpoint xmlns="http://ws.apache.org/ns/synapse" name="jms" sequence="request" onError="fault" protocol="jms" suspend="false">
      <parameters>
         <parameter name="interval">1000</parameter>
         <parameter name="coordination">true</parameter> 
         <parameter name="transport.jms.Destination">ordersQueue</parameter>
         <parameter name="transport.jms.CacheLevel">1</parameter>
         <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
         <parameter name="sequential">true</parameter>
         <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
         <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
         <parameter name="transport.jms.SessionAcknowledgement">AUTO_ACKNOWLEDGE</parameter>
         <parameter name="transport.jms.SessionTransacted">false</parameter>
         <parameter name="transport.jms.ConnectionFactoryType">queue</parameter>
      </parameters>
   </inboundEndpoint>

JMS inbound endpoint parameters

Parameter Name

Description

Required

Possible Values

Default Value

java.naming.factory.initial

The JNDI initial context factory class. The class must implement the java.naming.spi.InitialContextFactory interface.

Yes

A valid class name

-

java.naming.provider.url

The URL of the JNDI provider.

Yes

A valid URL

-

transport.jms.SessionTransacted

Whether the JMS session should be transacted or not.

No

true, false

true if the transactionality is local.

transport.jms.SessionAcknowledgement

The JMS session acknowledgment mode.

No

AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED

AUTO_ACKNOWLEDGE

transport.jms.ConnectionFactoryJNDIName

The JNDI name of the connection factory.

Yes

-

-

transport.jms.ConnectionFactoryType

The type of the connection factory.

No

queue, topic

queue

transport.jms.JMSSpecVersion

The JMS API version.

No

1.1 , 1.0.2b

1.1

transport.jms.UserName

The JMS connection username.

No

-

-

transport.jms.Password

The JMS connection password.

No

-

-

transport.jms.Destination

The JNDI name of the destination.

No

-

The defaults value is the service name.

transport.jms.DestinationType

The type of the destination.

No

queue, topic

queue

transport.jms.CacheLevel

The JMS resource cache level.

No

1 - connection, 2 - session, 3 - consumer

3

transport.jms.ReceiveTimeout

The time to wait for a JMS message during polling.
Set this parameter value to a negative integer to wait indefinitely. Set it to zero to prevent waiting.
NoThe number of milliseconds to wait.1
transport.jms.ContentTypeHow the inbound listener should determine the content type of the received messages. Priority is always given to the JMS message type.NoA simple string value, in which case the transport listener assumes that the received messages always have the specified content type.-
transport.jms.SubscriptionDurableWhether the connection factory is subscription durable or not.Notrue, falsefalse
transport.jms.DurableSubscriberClientIDThe ClientId parameter when using durable subscriptions.Required if the value specified as transport.jms.SubscriptionDurable is true.--

transport.jms.DurableSubscriberName

The name of the durable subscriber.

Required if the value specified as transport.jms.SubscriptionDurable is true.

-

-

transport.jms.ContentTypePropertyGet the content type from message propertyNocontentType-
transport.jms.ReplyDestinationThe destination that the response generated by the back-end service is stored.No-ReplyTo from the message

Note: In order to subscribe to topics set the transport.jms.CacheLevel to consumer (level 3).

Note

In order to subscribe to topics, set the value of transport.jms.CacheLevel to consumer.

For a sample that demonstrates how one way message bridging from JMS to HTTP can be done using the JMS inbound endpoint, see Sample 901: Inbound Endpoint JMS Protocol Sample.

  • No labels