Skip to main content

jms

JMS sink allows users to subscribe to a JMS broker and publish JMS messages.

Syntax

CREATE SINK <NAME> WITH (type="jms", map.type="<STRING>", connection.factory.jndi.name="<STRING>", factory.initial="<STRING>", provider.url="<STRING>", connection.factory.type="<STRING>", connection.username="<STRING>", connection.password="<STRING>", connection.factory.nature="<STRING>")

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
destinationQueue/Topic name which JMS Source should subscribe toSTRINGNoYes
connection.factory.jndi.nameJMS Connection Factory JNDI name. This value will be used for the JNDI lookup to find the JMS Connection Factory.QueueConnectionFactorySTRINGYesNo
factory.initialNaming factory initial valueSTRINGNoNo
provider.urlJava naming provider URL. Property for specifying configuration information for the service provider to use. The value of the property should contain a URL string (e.g. "ldap://somehost:389")STRINGNoNo
connection.factory.typeType of the connection connection factory. This can be either queue or topic.queueSTRINGYesNo
connection.usernameUsername for the broker.NoneSTRINGYesNo
connection.passwordPassword for the broker.NoneSTRINGYesNo
connection.factory.natureConnection factory nature for the broker(cached/pooled).defaultSTRINGYesNo

Example 1

CREATE SINK inputStream WITH (type='jms', map.type='text', factory.initial='org.apache.activemq.jndi.ActiveMQInitialContextFactory', provider.url='vm://localhost', destination='DAS_JMS_OUTPUT_TEST', connection.factory.type='topic', connection.factory.jndi.name='TopicConnectionFactory') (name string, age int, country string);

This example shows how to publish to an ActiveMQ topic.

Example 2

CREATE SINK inputStream WITH (type='jms', map.type='text', factory.initial='org.apache.activemq.jndi.ActiveMQInitialContextFactory', provider.url='vm://localhost',destination='DAS_JMS_OUTPUT_TEST') (name string, age int, country string);

This example shows how to publish to an ActiveMQ queue. Note that we are not providing properties like connection factory type.