Configuring the components - Cloud - 8.0

JMS (Mediation)

Version
Cloud
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Messaging components (Mediation) > JMS components (Mediation)
Data Quality and Preparation > Third-party systems > Messaging components (Mediation) > JMS components (Mediation)
Design and Development > Third-party systems > Messaging components (Mediation) > JMS components (Mediation)
Last publication date
2024-03-06

Procedure

  1. Double-click the cMQConnectionFactory component labeled AMQ_Send_ConnectionFactory to display its Basic settings view in the Component tab.
  2. From the MQ Server list, select an MQ server. In this use case, we use the default ActiveMQ server to handle the messages.
  3. In the Broker URI field, type in Active MQ's default URI of the localhost server: "tcp://localhost:61616".
  4. Double-click the cConfig component, which is labeled DatasetConfig, to display its Basic settings view in the Component tab and set its parameters.
  5. Write a piece of code in the Code field to register the dataset instance hello into the registry, as shown below.
    org.apache.camel.component.dataset.SimpleDataSet dataset = new 
    org.apache.camel.component.dataset.SimpleDataSet(1);
    dataset.setDefaultBody("Test Data: hello world!");
    org.apache.camel.impl.SimpleRegistry registry = new  
    org.apache.camel.impl.SimpleRegistry();
         registry.put("hello",dataset);
    camelContext.setRegistry(registry); 
  6. Double-click the cMessagingEndpoint component, which is labeled SimpleDatasetGen, to display its Basic settings view in the Component tab. and set its parameters.
  7. In the URI field, enter dataset:hello between the quotation marks.
  8. Double-click the cJMS component labeled AMQ_Send to display its Basic settings view.
  9. From the Type list, select queue to send the message to a JMS queue.
    In the Destination field, type in a name for the JMS queue, "queue.hello" in this use case.
    Double-click the [...] button next to ConnectionFactory. Select the MQ connection factory that you have just configured in the dialog box and click OK.
  10. Double-click the cProcessor component labeled PrintSendMsg to display its Basic settings view in the Component tab, and customize the code in the Code area to display the sent message intercepted on the console.
    System.out.println("AMQ Send: "+
    exchange.getIn().getBody(String.class));