Component family |
Internet |
|
Function |
Fetches a message from a queue on a Message-Oriented middle ware |
|
Purpose |
tMomInput makes it possible to |
|
Basic settings |
Use existing connection |
Select this check box and in the Component List click the NoteWhen a Job contains the parent Job and the child Job, Component |
Keep listening |
Select this check box to keep the MOM server listening for and -For JBoss Messaging server, -For Active MQ server, with this |
|
|
Sleeping time (in sec) |
Set the frequency by typing in numbers. (Available when ActiveMQ or |
|
MQ Server |
Select the MOM server to be used from the list. According to the |
|
Host/Port |
Fill in the Host name or IP address of the MOM server and |
|
Username |
Connection login to the server you select in the MQ Server list. |
|
Password |
Connection password to the server you select in the MQ Server list. To enter the password, click the […] button next to the |
|
Message From |
Type in the message source, exactly as expected by the server; Note that the field is case-sensitive. (Available when ActiveMQ or |
|
Message Type |
Select the message type, either: Topic or Queue. (Available when ActiveMQ or |
|
Message Body Type |
Select the message body type, either: Text , Bytes or |
|
Schema and Edit |
A schema is a row description, it defines the number of fields In the context of tMomInput |
Websphere MQ |
Channel |
Fill this field with the name of the channel through which the |
|
Queue Manager |
A system program that provides a logical container for the message |
|
Message Queue |
A queue from which message queueing applications can put messages |
|
Is using message id to fetch |
Select this check box to fetch messages according to their |
|
Commit (delete message after reading from the |
Select this check box to force a commit after reading each message |
Backout removed messages |
Select this check box to indicate to the queue manager that all NoteThis check box and the Browse |
|
ActiveMQ |
Receive number of messages |
Select this check box to set the number of messages that you will Warning
When you want to limit the number of |
Failover |
Select this check box to show the server address table. In that table, you can define multiple MQ servers for |
|
Advanced settings |
Additional options |
Define the failover transport options in the table. This table is
For example, enter maxReconnectAttempts in the Option name field and then 0 in the Option For more information about the transport options, see http://activemq.apache.org/failover-transport-reference.html. |
Acknowledgement Mode |
Select an acknowledgement mode from the list to indicate that the Auto Acknowledge: With this Client Acknowledge: With this Dups OK Acknowledge: This For further information about the usage of Jms headers, see https://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/csqzaw07.pdf. NoteIf the check box Set |
|
Get Jms Header |
Select this check box to receive the Jms headers through the NoteThis check box is enabled when the MQ server is ActiveMQ |
|
Get Jms Properties |
Select this check box to receive the Jms properties mapped to MQMD (Available when ActiveMQ or |
|
Browse message |
Select this check box to disable Commit(delete message after reading from the queue) NoteThis check box and the Backout removed |
|
Get MQMD Fields |
Select this check box to set one or more message descriptors by Field Name: Select one or more Reference Column Name: The header For further information, see http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0m0/index.jsp?topic=%2Fcom.ibm.mq.csqzak.doc%2Ffr13040_.htm/. (Available when WebSphere MQ is |
|
Include Header |
Select this check box to specify the header of the message: MQRFH2 fixed Portion: Select this MCD folder: Select this check box JMS folder: Select this check box USR folder: Select this check box For further information about MQRFH2 header, see http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Faq06920_.htm. (Available when WebSphere MQ is |
|
Set CipherSpec |
Select this check box to enable the CipherSpec list from which you For further information about CipherSpec, see http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=%2Fcom.ibm.mq.csqzas.doc%2Fsy12870_.htm. (Available when WebSphere MQ is |
|
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a |
|
Dynamic settings |
Click the [+] button to add a The Dynamic settings table is available only when the For more information on Dynamic settings and context |
|
Global Variables |
ERROR_MESSAGE: the error message generated by the NB_LINE: the number of rows read by an input component or A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
Usage |
This component is generally used as a start component. It must be |
|
Limitation |
Make sure the relevant ActiveMQ, JBoss Messaging or Websphere MQ This component requires installation of its related jar files. For more information about the |
This scenario is made of two Jobs. The first Job posts messages on a JBoss server
queue and the second Job fetches the message from the server.
In the first Job, a string message is created using a tRowGenerator and put on a JBoss server using a tMomOutput. An intermediary tLogRow component displays the flow being passed.
-
Drop the three components required for the first Job from the Palette onto the design workspace and right-click
to connect them using a Main row
link. -
Double-click on tRowGenerator to set the
schema to be randomly generated. -
Set just one column called message. This is the
message to be put on the MOM queue. -
This column is of String type and is
nullable. To produce the data, use a preset function which concatenates
randomly chosen ascii characters to form a 6-char string. This function is
getAsciiRandomString
. (Java version). Click the Preview
button to view a random sample of data generated. -
Set the Number of rows to be generated to
10.Click OK to validate.
-
The tLogRow is only used to display a
intermediary state of the data to be handled. In this example, it doesn’t
require any specific configuration. -
Then select the tMomOutput
component. -
In this case, the MQ server to be used is
JBoss.In the Host and Port fields, fill in the relevant connection
information. -
Select the Message type from the list.
The message can be of Queue or Topic type. In this example, select the Queue type from the list. -
In the To field, type in the message
source information strictly respecting the syntax expected by the server.
This should match the Message Type you selected, such as:
queue/A
.Note
The message name is case-sensitive, therefore
queue/A
and
Queue/A
are different. -
Then click Sync Columns to pass on the
schema from the preceding component. The schema being read-only, it cannot
be changed. The data posted onto the MQ comes from the first schema column
encountered. -
Press F6 to execute the Job and view the
data flow being passed on in the console, thanks to the tLogRow component.
Then set the second Job in order to fetch the queuing messages from the MOM
server.
-
Drop the tMomInput component and a
tLogRow from the Palette to the design workspace. -
Select the tMomInput to set the
parameters. -
Select the MQ server from the list. In
this example, a JBoss messaging server is used. -
Set the server Host and Port information.
-
Set the Message From and the Message Type to match the source and type
expected by the messaging server. -
The Schema is read-only and is made of
two columns: From and Message. -
Select the Keep listening check box and
set the verification frequency to 5 seconds.Note
When using the Keep Listening option,
you’ll need to kill the Job to end it. -
No need to change any default setting from the tLogRow.
-
Save the Job and run it (when launching for the first time or if you
killed it on a previous run).The messages fetched on the server are displayed on the console.
This scenario describes a five-component Job composed of two subjobs that sends XML
files from a local folder to a MOM queue, and then fetches the files from the MOM queue
and displays the contents of the files on the console.
-
From the Palette, drop the following
components one after another onto the design workspace: tFileList, tFileInputXML, tMomOutput,
tMomInput, and tLogRow. -
Connect tFileList to tFileInputXML using a Row > Iterate link, and
connect tFileInputXML to tMomOutput using a Row > Main link to form the
first subjob. This subjob will read each XML file in a given folder and send
it to a MOM queue. -
Connect tMomInput to tLogRow using a Row > Main link to form the
second subjob. This subjob will fetch the XML files from MOM queue and
display the file contents on the console. -
Connect tFileInputXML to tMomInput using a Trigger > On Component Ok
connection to link the two subjobs.
-
Double-click the tFileList component
to open its Basic settings view. -
In the Directory field, enter the
path to the directory to read XML files from, or browse to the path by
clicking the […] button next to the
field. -
Select Use Glob Expressions as
Filemask check box, add a new line in the Files field by clicking the [+] button, and enter"*.xml"
as
the file mask so that all XML files in the directory will be used. Keep
all the other settings as they are. -
Double-click the tFileInputXML
component to open its Basic settings
view. -
Click the […] button next to
Edit schema to open the [Schema] dialog box. -
Click the [+] button to add a column,
give it a name, message in this
example, and select Document from the
Type list to handle XML format
files. Then, click OK to close the
dialog box. -
In the File name/Stream field, press
Ctrl+Space to access the global
variable list, and selecttFileList_1.CURRENT_FILEPATH
to
loop on the context files’ directory. -
In in the Loop XPath query fields,
enter"/"
to define the root as the loop node of the input
files’ structure; in the Mapping table,
fill the XPath query column with
"."
to extract all data from context node of the source
files, and select the Get Nodes check
box to build a Document type data flow.
-
Double-click the tMomOutput component
to open its Basic settings view. -
Select WebSphere MQ from the
MQ server list, and enter the host
name or IP address of the MQ server and the port number. -
Enter the login authentication information in the Username and Password fields, and enter the channel name of the
transmission queue in the Channel
field. -
As we are handling file messages, select Text
Message from the Message Body
Type list. -
Click Sync columns to retrieve the
schema structure from the preceding component. -
Fill in the queue manager and message queue details in the
corresponding fields, and leave the other settings as they are.
-
Double-click the tMomInput component to
open its Basic settings view. -
Set the basic parameters of the component using the same settings you have
done in the tMomOutput component, including
the MQ server details, login authentication details, channel, message body
type, queue manager and message queue. -
Click the […] button next to Edit schema to open the [Schema] dialog box.
-
From the Type list for the message column, select Document to handle XML format files, and then click
OK to close the dialog box.