tMicrosoftMQInput - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

tMicrosoftMQInput Properties

Component family

Internet/MOM and JMS

 

Function

This component retrieves the first message in a given Microsoft message queue (only support String).

Purpose

This component allows you to fetch messages one by one in the ID sequence of these messages from the Microsoft message queue. Each execution retrieves only one message.

Basic settings

Property type

Always Built-in. Its schema has only one read-only column of string type: message.

 

 

Built-in: No property data stored centrally. Enter properties manually

 

 

Repository: Select the repository file where properties are stored. The fields that come after are pre-filled in using the fetched data.

 

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.

  • Private: a private queue, which is registered on the local machine.

  • Public: a public queue, which is registered in the directory service.

For more information about Microsoft message queue types, see http://msdn.microsoft.com/en-us/library/ms706878%28v=vs.85%29.aspx.

 

Die on error

This check box is cleared by default, meaning to skip the row on error and to complete the process for error-free rows.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a Job level as well as at each component level.

Global Variables

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio User Guide.

Usage

This component is generally used as a start component of a Job or Subjob. It must be linked to an output component.

Connections

Outgoing links (from this component to another):

Row: Main, Iterate

Trigger: Run if; On Subjob Ok, On Subjob Error, On Component Ok; On Component Error.

Incoming links (from one component to this one):

Row: Iterate;

Trigger: Run if, On Subjob Ok, On Subjob Error, On Component Ok, On Component Error.

For further information regarding connections, see Talend Studio User Guide.

Limitation

This component supports only String type. Also, it only works with the Windows systems.

This component requires installation of its related jar files. For more information about the installation of these missing jar files, see the section describing how to configure the Studio of the Talend Installation Guide.

Scenario: 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

  1. Drop the three components required for the first Job from the Palette onto the design workspace.

  2. Connect the components using a Row > Main link.

Configuring the components

  1. Double-click tRowGenerator to open its editor.

  2. Click the plus button to add three rows into the schema table.

  3. In the Column column, type in a new name for each row to rename it. Here, we type in ID, Name and Address.

  4. In the Type column, select Integer for the ID row from the drop-down list and leave the other rows as String.

  5. In the Functions column, select random for the ID row, getFirstName for the Name row and getUsCity for the Address row.

  6. 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.

  7. Double click the tMicrosoftMQOutput component to open its Component view.

  8. In the Host field, type in the host address. In this example, it is localhost.

  9. In the Queue field, type in the queue name you want to write message in. In this example, name it AddressQueue.

  10. In Message column (String Type) field, select Address from the drop-down list to determine the message body to be written.

Saving and executing the Job

  1. Press Ctrl+S to save your Job.

  2. 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.

Dropping and linking components

  1. Drop tMicrosoftMQInput and tLogRow from the Palette to the design workspace.

  2. Connect these two components using a Row > Main link.

Configuring the components

  1. Double-click the tMicrosoftMQInput to open its Component view.

  2. In the Host field, type in the host name or address. Here, we type in localhost.

  3. 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

  1. Press Ctrl+S to save your Job.

  2. 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.