JMS Receiver

Definition

Protocol

JMS

 

 

Description

Connect to a JMS server using JMSConfig and retrieve messages from a queue or topic, transforming messages into ECS events.

 

 

Comments

If JMSConfig is missing, blank or invalid, source is disabled.
 

Supported JMS message types are:

  • Text: a field will be added to the newly created event with the name "ev:Jms.TextMessage" and the value of the message text;
    Value of message text will also be add to "ev:msg" field.

  • Map: each property in the MapMessage becomes an event field, with the corresponding name and value.

For any other (unsupported) message types, an event will be created with a field having the name "ev:Jms:Error" and the value "Unsupported message type: <type>"

 

Example

This is example receiver configuration for the use of OpenJms server.

For this to work following libraries from OpenJms need to be added into ECS classpath(EV_HOME/bin/service.cfg file):
commons-logging-1.0.3.jar
exolabcore-0.3.7.jar
openjms-client-0.7.6.1.jar

<source objectId="JMS-Source" stdout="ProcessInput2-Stack" type="JMSReceiver">
	<parameter type="JMSConfig">
		<jndiInitialContextFactory>
			org.exolab.jms.jndi.InitialContextFactory
		</jndiInitialContextFactory>
		<jndiProviderUrl>rmi://localhost:1099/</jndiProviderUrl>
		<jndiUsername/>
		<jndiPassword/>
		<jmsConnectionFactoryName>
			JmsQueueConnectionFactory
		</jmsConnectionFactoryName>
		<jmsDestinationType>queue</jmsDestinationType>
		<jmsDestinationName>queue1</jmsDestinationName>
	</parameter>
</source>