tMicrosoftMQInput
Retrieves the first message in a given Microsoft message queue (only support
String).
tMicrosoftMQInput fetches messages one by one based on the ID sequence of
these messages from the Microsoft message queue. Each execution retrieves only one
message.
For further information, see the section about messaging brokers supported by Talend messaging components in Talend Data Fabric Studio User Guide.
tMicrosoftMQInput Standard properties
These properties are used to configure tMicrosoftMQInput running in the Standard Job framework.
The Standard
tMicrosoftMQInput component belongs to the Internet family.
The component in this framework is available in all Talend
products.
Basic settings
Property type |
Always Built-in. Its schema has |
 |
Built-in: No property data stored |
 |
Repository: Select the repository |
Host |
Type in the Host name or IP address of the host server. |
Queue |
Enter the queue name you want to retrieve messages from. |
Queue type |
Select a Microsoft message queue type from the drop-down list.
For more information about Microsoft message queue types, see |
Die on error |
This check box is cleared by default, meaning to skip the row on |
Advanced settings
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a |
Global Variables
Global Variables |
ERROR_MESSAGE: the error message generated by the 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 |
Usage
Usage rule |
This component is generally used as a start component of a Job or |
Connections |
Outgoing links (from this component to another): Row: Main, Iterate
Trigger: Run if; On Subjob Ok, On Incoming links (from one component to this one): Row: Iterate;
Trigger: Run if, On Subjob Ok, On For further information regarding connections, see |
Limitation |
This component supports only String type. Also, it only works with This component requires installation of its related jar files. |
Writing and fetching queuing messages from Microsoft message
queue
This scenario is made of two Jobs. The first Job posts messages on a Microsoft
message queue and the second Job fetches the message from the server.
Posting messages on a Microsoft message queue
In the first Job, a string message is created using a tRowGenerator and put on a Microsoft message queue using a tMicrosoftMQOutput. An intermediary tLogRow component displays the flow being passed.
Dropping and linking components
- Drop the three components required for the first Job from the Palette onto the design workspace.
-
Connect the components using a Row >
Main link.
Configuring the components
-
Double-click tRowGenerator to open its
editor. - Click the plus button to add three rows into the schema table.
-
In the Column column, type in a new name
for each row to rename it. Here, we type in ID,
Name and Address. -
In the Type column, select Integer for the ID row from
the drop-down list and leave the other rows as String. -
In the Functions column, select
random
for the ID row,
getFirstName
for the Name row and
getUsCity
for the Address row. -
In the Number of Rows for RowGenerator
field on the right end of the toolbar, type in 12 to
limit the number of rows to be generated. Then, Click Ok to validate this editing.Note:In real case, you may use an input component to load the data of your
interest, instead of the tRowGenerator
component. -
Double click the tMicrosoftMQOutput
component to open its Component
view. -
In the Host field, type in the host
address. In this example, it is localhost. -
In the Queue field, type in the queue
name you want to write message in. In this example, name it
AddressQueue. -
In Message column (String Type
) field, select Address from
the drop-down list to determine the message body to be written.
Fetching the
message
- Press Ctrl+S to save your Job.
-
Press F6 or click Run on the Run tab to
execute the Job.You can see that this queue has been created automatically and that the
messages have been written.
Fetching the first queuing message from the message queue
Now set the second Job in order to fetch the first queuing message from the
message queue.
Arranging the flow of the message
- Drop tMicrosoftMQInput and tLogRow from the Palette to the design workspace.
-
Connect these two components using a Row
> Main link.
Configuring
how the message is processed
-
Double-click the tMicrosoftMQInput to
open its Component view. -
In the Host field, type in the host name
or address. Here, we type in localhost. -
In the Queue field, type in the queue
name from which you want to fetch the message. In this example, it is
AddressQueue.
Saving and executing the Job
- Press Ctrl+S to save your Job.
-
Press F6 or click Run on the Run tab to
execute the Job.The message body Atlanta fetched from the queue is
displayed on the console.