JMSReader

We assume that you have already learned what is described in:

If you want to find the right Reader for your purposes, see Readers Comparison.

Short Summary

JMSReader converts JMS messages into CloudConnect data records.

Component Data source Input ports Output ports Each to all outputs1) Different to different outputs2) Transformation Transf. req. Java CTL
JMSReaderjms messages01yesnoyesnoyesno

Legend

1) Component sends each data record to all connected output ports.

2) Component sends different data records to different output ports using return values of the transformation. See Return Values of Transformations for more information.

Abstract

JMSReader receives JMS messages, converts them into CloudConnect data records and sends these records to the connected output port. Component uses a processor transformation which implements a JmsMsg2DataRecord interface or inherits from a JmsMsg2DataRecordBase superclass. Methods of JmsMsg2DataRecord interface are described below.

Icon

Ports

Port typeNumberRequiredDescriptionMetadata
Output0yesFor correct data recordsAny1)

Legend:

1): Metadata on the output port may contain a field specified in the Message body field attribute. Metadata can also use Autofilling Functions.

JMSReader Attributes

AttributeReqDescriptionPossible values
Basic
JMS connectionyesID of the JMS connection to be used. 
Processor code1)Transformation of JMS messages to records written in the graph in Java. 
Processor URL1)Name of external file, including path, containing the transformation of JMS messages to records written in Java. 
Processor class1)Name of external class defining the transformation of JMS messages to records. The default processor value is sufficient for most cases. It can process both javax.jms.TextMessage and javax.jms.BytesMessage.JmsMsg2DataRecordProperties (default) | other class
JMS message selector Standard JMX "query" used to filter the JMS messages that should be processed. In effect, it is a string query using message properties and syntax that is a subset of SQL expressions. See http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html for more information. 
Processor source charset Encoding of external file containing the transformation in Java.ISO-8859-1 (default) | other encoding
Message charset Encoding of JMS messages contents. This attribute is also used by the default processor implementation (JmsMsg2DataRecordProperties). And it is used for javax.jms.BytesMessage only.ISO-8859-1 (default) | other encoding
Advanced
Max msg count Maximum number of messages to be received. 0 means without limitation. See Limit of Run for more information.0 (default) | 1-N
Timeout Maximum time to receive messages in milliseconds. 0 means without limitation. See Limit of Run for more information.0 (default) | 1-N
Message body field Name of the field to which message body should be written. This attribute is used by the default processor implementation (JmsMsg2DataRecordProperties). If no Message body field is specified, the field whose name is bodyField will be filled with the body of the message. If no field for the body of the message is contained in metadata, the body will not be written to any field.bodyField (default) | other name

Legend:

1) One of these may be set. Any of these transformation attributes implements a JmsMsg2DataRecord interface.

See Java Interfaces for JMSReader for more information.

See also Defining Transformations for detailed information about transformations.

Advanced Description

Limit of Run

It is also important to decide whether you want to limit the number of received messages and/or time of processing. This can be done by using the following setting:

Java Interfaces for JMSReader

The transformation implements methods of the JmsMsg2DataRecord interface and inherits other common methods from the Transform interface. See Common Java Interfaces.

Following are the methods of JmsMsg2DataRecord interface: