JMS Producer
The JMS Producer destination writes data to a Java Messaging Service (JMS). Before you use JMS Producer, install the drivers required for your JMS implementation. For information about supported versions, see Supported Systems and Versions in the Data Collector documentation.
When you configure a JMS Producer, you configure how the destination connects to the JMS
server and the JMS destination name. You can optionally specify the JMS destination
type, JMS credentials, and configure any additional JMS configuration properties that
you require. You can configure the destination to include record header attributes with
a jms.header
prefix as JMS message headers.
You can also use a connection to configure the destination.
Installing JMS Drivers
Before you use the JMS Producer destination, install the JMS drivers for the implementation that you are using.
For example, to use the Oracle version of JMS, you need to install the Oracle JMS
drivers: wljmsclient.jar
and wlclient.jar
. Or to
use the ActiveMQ version, install all the ActiveMQ jars: activemq-all-*.jar.
You install the driver into the JMS stage library, streamsets-datacollector-jms-lib
, which includes the destination.
For information about installing additional drivers, see Install External Libraries in the Data Collector documentation.
Include Headers
You can configure
the destination to include record header attributes with a jms.header
prefix as headers in the JMS messages.
jms.header
prefix in
the following situations:- When you configure the JMS Consumer origin to include JMS headers as record
header attributes. The origin names JMS record header attributes as follows:
jms.header.<header name>
. - When you configure an Expression Evaluator or a scripting processor to add
record header attributes with a
jms.header
prefix.For more information, see Generating Attributes for Record-Based Writes.
For example, let's say that you build a pipeline that includes the JMS Consumer origin and the JMS Producer destination to move data from one JMS server to another. You want to retain the message header values included in the source JMS messages in the JMS messages written to the target JMS server. You configure the origin to include JMS headers as record header attributes, and then configure the destination to include these record header attributes as JMS headers in the messages.
By default, the destination includes the jms.header
prefix in the JMS
header names. You can optionally configure the destination to remove the prefix before
including the headers in the JMS messages.
Additional JMS Properties
- Additional JMS Configuration Properties on the JMS tab
- Additional Security Properties on the Credentials tab
You can define any additional JMS or JNDI property in either location. However, only additional security properties defined on the Credentials tab support using credential functions to retrieve sensitive information from supported credential stores. For more information about credential stores, see Credential Stores in the Data Collector documentation.
If you define the same property in both locations, additional security properties defined on the Credentials tab take precedence.
When you add a configuration property to either location, enter the exact property name and the value. The JMS Consumer does not validate the property names or values.
Working with TIBCO EMS
- java.naming.security.principal = <username>
- java.naming.security.credentials = <password>
Configuring for TIBCO and SSL
- com.tibco.tibjms.naming.security_protocol = ssl
- com.tibco.tibjms.naming.ssl_enable_verify_host = false
- com.tibco.tibjms.naming.ssl_expected_hostname = <tibco _server_hostname>
- com.tibco.tibjms.naming.ssl_identity = <path_to>/server-cert.p12
- com.tibco.tibjms.naming.ssl_password = <password>
- com.tibco.tibjms.naming.ssl_trusted_certs = <path_to>/cert_chain.pem
-
com.tibco.tibjms.naming.ssl_vendor = j2se-default
For example:
- com.tibco.tibjms.naming.security_protocol = ssl
- com.tibco.tibjms.naming.ssl_enable_verify_host = false
- com.tibco.tibjms.naming.ssl_expected_hostname = server1
- com.tibco.tibjms.naming.ssl_identity = /tibco/ems/certs/server-cert.p12
- com.tibco.tibjms.naming.ssl_password = password
- com.tibco.tibjms.naming.ssl_trusted_certs = /tibco/ems/certs/cert_chain.pem
-
com.tibco.tibjms.naming.ssl_vendor = j2se-default
Data Formats
- Avro
- The stage writes records based on the Avro schema. You can use one of the following methods to specify the location of the Avro schema definition:
- Binary
- The stage writes binary data to a single field in the record.
- Delimited
- The destination writes records as delimited data. When you use this data format, the root field must be list or list-map.
- JSON
- The destination writes records as JSON data. You can use one of
the following formats:
- Array - Each file includes a single array. In the array, each element is a JSON representation of each record.
- Multiple objects - Each file includes multiple JSON objects. Each object is a JSON representation of a record.
- Protobuf
- Writes one record in a message. Uses the user-defined message type and the definition of the message type in the descriptor file to generate the message.
- SDC Record
- The destination writes records in the SDC Record data format.
- Text
- The destination writes data from a single text field to the destination system. When you configure the stage, you select the field to use.
- XML
- The destination creates a valid XML document for each record. The
destination requires the record to have a single root field that
contains the rest of the record data. For details and
suggestions for how to accomplish this, see Record Structure Requirement.
The destination can include indentation to produce human-readable documents. It can also validate that the generated XML conforms to the specified schema definition. Records with invalid schemas are handled based on the error handling configured for the destination.
Configuring a JMS Producer Destination
Configure a JMS Producer destination to write to JMS.