JMSWriter converts CloverDX data records into JMS messages.
|Component||Data output||Input ports||Output ports||Transformation||Transf. required||Java||CTL||Auto-propagated metadata|
|Input||0||For data records||Any|
JMSWriter does not propagate metadata.
JMSWriter has no metadata templates.
Metadata on the input port may contain a field specified in the Message body field attribute.
|JMS connection||yes||ID of the JMS connection to be used. See JMS Connections.|
|Processor code||Transformation of records to JMS messages written in the graph in Java.|
|Processor URL||Name of an external file, including the path, containing the transformation of records to JMS messages written in Java.|
Name of an external class defining the
transformation of records to JMS messages.
The default processor value (
|DataRecord2JmsMsgProperties (default) | other class|
|Processor source charset||
Encoding of external file containing the transformation in Java.
The default encoding depends on DEFAULT_SOURCE_CODE_CHARSET in defaultProperties.
|UTF-8 | other encoding|
|Message body field||Name of the field of metadata from which the body of
the message should be gotten and sent out.
This attribute is used by the default processor implementation
(||bodyField (default) | other name|
JMSWriter receives CloverDX data records,
converts them into JMS messages and sends these messages out.
Component uses a processor transformation which implements a
DataRecord2JmsMsg interface or inherits from a
DataRecord2JmsMsg interface are described
Details on threads are described in Details in JMSReader.
Data inserted into the body or header of a message depends on the
implementation of the
The default implementation is
The message body may be filled with textual representation
of one field of the record.
You can specify name of such field by the component attribute
Message body field.
All the other fields are saved using string properties in the message header. Property names are same as field names. Values contain textual representation of field values. Last message has same format as all the others. Terminating message is not used.
The transformation implements methods of the
and inherits other common methods from the
See Common Java Interfaces.
You can use Public CloverDX API too.
Following are the methods of
void init(DataRecordMetadata metadata, Session
session, Properties props)
Initializes the processor.
void preExecute(Session session)
This is also an initialization method, which is invoked
before each separate graph run.
Contrary to the
init() procedure, only
resources for this graph run should be allocated here.
All resources allocated here should be released in the
session may be used for creation of JMS messages.
Each graph execution has its own session opened.
Thus the session set in the
init() method is usable
only during the first execution of the graph instance.
Transforms data record to JMS message. Is called for all data records.
This method is called after last record and is supposed to return a message terminating the JMS output. If it returns null, no terminating message is sent. Since 2.8.
Returns an error message.
This method is not called explicitly since 2.8.
There is a message queue
Write 5 records into the message queue.
Create a JMS Connection
The details are described in the example Read Text Message from Message Queue
in documentation on JMSReader.
Configure the JMSWriter component.
|Message body field||e.g. field1|
If Processor URL is used, we recommend users to explicitly specify Processor source charset.