JMS makes operations in message barrings that support API JMS. We currently support ActiveMQ, IBM MQ, Oracle AQ and Tibco EMS.

Take a look at the configuration parameters of the component, depending on the barring type you want to use:

  • Account: BASIC-type account to be used for authentication in the JMS configured broker.

  • Message: content of the message to be sent. In this field you can inform any text value. This parameter supports Double Braces.

  • Destination: type of destination where the message will be sent to (QUEUE or TOPIC).

  • Name: name of the queue or topic.

  • JMS Provider: JMS provider to be used. Available options: ActiveMQ, IBM MQ, Oracle AQ and Tibco EMS.

  • Is Binary: “true” if the received message is a base64 of the bytes you need to send; otherwise, the message will be sent as text.

  • Charset: if the message you need to send is binary, then you must select the charset for the message.

  • Raw Value: “true” if the message is a raw value and needs to be sent as JSON (eg.: the word 'test' will be sent as "test").

  • Fail On Error: if the option is enabled, an error suspends the pipeline execution.

  • Advanced Configurations:

- Correlation ID: a JMS client can use the JMS Correlation ID header to associate a message to another (for request/answer requests). This field can have an arbitrary string value. The use of this field is optional.

- Expiration: expiration time of the message inside the queue or topic (Time To Live). In milliseconds.

- Priority: defines the message priority. A value from 0 to 4 indicates normal priority (4 is standard); and the values from 5 to 9 indicate greater priority.

- Type: this field can be used to define some value in the message dispatch, which can be used to filter it.

- JMS Object Properties: defines some JMSX properties of API JMS that can be configured:

-> JMSX User ID (String): arbitrary string that identifies the user sending the message. It must be defined by the provider during the dispatch operation.

-> JMSX App ID (String): identity of the dispatch application. It must be defined by the provider during the dispatch operation.

-> JMSX Delivery Count (int): number of tries to send the message. This is defined by the provider.

-> JMSX Group ID (String): identity of the message group (defined by the client) that the message in discussion doesn't belong to. It must be used by the clients that send messages in batches.

-> JMSX Group Seq (int): message numerical sequence (defined by the client) inside a group.

-> JMSX Producer TX ID (String): transaction identifier inside which the message was produced. This is defined by the provider.

->JMSX Consumer TX ID (String): transaction identifier inside which the message was consumed. This is defined by the provider.

-> JMSX Rcv Timestamp (long): time taken for a message to be delivered to its end consumer. This is defined by the provider.

-> JMSX State (int): it can be 1 (on hold), 2 (ready), 3 (expired) or 4 (retained). This isn't relevant for the client application, being internally used by the provider.

Example of use in the field of some properties:

{

"JMSXUserID": "123",

"JMSXState": 1,

"JMSXGroupID": "test"

}

There're some specific properties for each broker:

Activemq e Tibco EMS

  • Url: JMS connection string in the format tcp://{host}:{port}

Oracle AQ

  • Host Name: host name of the JMS string connection

  • Port: port number to Oracle

  • Sid: Oracle database sid (site identifier)

  • JBDC Driver: Oracle JBDC driver (eg.: THIN or OCI)

IBM MQ

There's still no support for authentication through TLS.

  • Host Name: host name for the JMS string connection

  • Port: port number for the IBM MQ broker

  • Channel Name: name of the channel to be used in the broker communication

  • Queue Manager: name of the IBM MQ queue manager

Messages flow

Input

The component accepts any input message and can use it through Double Braces.

Output

  • Success

{
"success": true,
"message": "MENSAGEM QUE FOI ENVIADA AO BROKER"
}

  • Error

{
"success": false,
"message": "Something went wrong while trying to produce the message to JMS service. Error: Error while attempting to add new Connection to the pool",
"error": "javax.jms.JMSException: Error while attempting to add new Connection to the pool"
}

JMS in Action

  • ActiveMQ and Tibco EM

Message:

{
"message": "test"
}

Destination: QUEUE

Name: NAME.OF.THE.QUEUE

JMS Provider: ActiveMQ

Connection string: tcp://<HOST>:<PORT>

Is Binary: disabled

Raw Value: disabled

Fail On Error: disabled

Response:

{
"success": true,
"message": {
"message": "test"
}
}

  • Oracle AQ

Message:

{
"message": "test"
}

Destination: QUEUE

Name: NAME.OF.THE.QUEUE

JMS Provider: Oracle AQ

Hostname: <HOSTNAME> ou <IP>

Port: <PORT>

SID: <ORACLE SID>

JDBC Type: thin

Is Binary: disabled

Raw Value: disabled

Fail On Error: disabled

Response:

{
"success": true,
"message": {
"message": "test"
}
}

  • IBM MQ

Message:

{
"message": "test"
}

Destination: QUEUE

Name: NAME.OF.THE.QUEUE

JMS Provider: IBM MQ

Hostname: <HOSTNAME> ou <IP>

Port: <PORT>

Channel Name: <IBM MQ CHANNEL NAME>

Queue Manager: <IBM MQ QUEUE MANAGER>

Is Binary: disabled

Raw Value: disabled

Fail On Error: disabled

Response:

{
"success": true,
"message": {
"message": "test"
}
}

Did this answer your question?