Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Perform the following steps after creating the ActiveMQ connection to send messages to the ActiveMQ server using Sigma Studio:

  1. Right-click the created ActiveMQ server connection and select the Create Data Source option.

    Refer Connectors - ActiveMQ for more information on creating an ActiveMQ connection.




    The Create Request page appears.



  2. Enter a unique data source name in the Data Source Name field. In this example, ActiveMQ_DS is provided as the data source name.
  3. Enter the queue name in Queue Name field. Here, Transaction is provided as the queue name.
  4. On the message transfer type field, Send Message is selected as default. Retain the option.
  5. Choose the Message Content type. Note: If you select File as the message content, you will be enabled to provide the file directory path and the file name on the respective fields.



  6. Click Save to save the ActiveMQ data source.



    A success message for creating the ActiveMQ data source appears as shown in the following screenshot:



  7. Click Ok

    In order to trigger the ActiveMQ service connection, the CT platform's server-side API, CT.ftp must be used while passing the ExecutionContext action in a Java Handler class. Refer the following sample code snippet for better understanding on this triggering process:

    Here, on the following sample code snippet a new ExecutionContext action is created within which a map (HashMap) is built. The ActiveMQ datasource ID is passed along with the message as inputs to activate the connection request within which the CT.ftp API is passed to trigger the process.

    ExecutionContext ec = new ExecutionContext();
    		Map inputParams1 = new HashMap();
    		inputParams1.put("DATA_SRC_ID","ActiveMQ_DS");   // Here, ActiveMQ_DS refers to the Datasource ID.
    		inputParams1.put("STREAM_MESSAGE","HI Team!");        // Here, Hi Team! refers to the message.
    		ec.setInitialRequestData(inputParams1);	
    try {
    			CT.ftp(ec);
    		}
    		catch(Exception e){
    
    		}
  • No labels