Skip to content

JMS / Jakarta

Browse implementations

Define a jms or jakarta target

  • Default connectionFactoryName is ConnectionFactory
  • To configure ssl, by default we add these properties in InitialContext :
    • connection.ConnectionFactory.keyStore with keyStore property
    • connection.ConnectionFactory.keyStorePassword with keyStorePassword property
    • connection.ConnectionFactory.keyStoreKeyPassword with keyPassword property
    • connection.ConnectionFactory.trustStore with trustStore property
    • connection.ConnectionFactory.trustStorePassword with trustStorePassword property
  • All configuration beginning with java.naming.* are added to the context
  • Other configuration:
    In order to provide more configuration, you should prefix all other target properties with jndi..
    By example, if you want to add com.specific.vendor.properties key, the key should be jndi.com.specific.vendor.properties
Jms/Jakarta target example
{
    "name": "JMS_TARGET",
    "url": "ssl://my.jms.server:61616",
    "properties": {
        "connectionFactoryName": "MyConnectionFactory",
        "java.naming.factory.initial": "org.apache.activemq.jndi.ActiveMQInitialContextFactory",

        "username": "myUsername", // (1)
        "password": "myPassword", // (2)
        "trustStore": "/home/APP/security/mytruststore.jks",
        "trustStorePassword": "myTrustStorePassword",
        "keyStore": "/home/APP/security/mykeyStore.jks",
        "keyStorePassword": "mykeyStorePassword",
        "keyPassword": "myKeyStoreKeyPassword"
    }
}
  1. Valid properties are username or user. Set this for basic authentication
  2. Valid properties are userPassword or password. Set this for basic authentication

Sender🔗

Browse JMS or Jakarta implementation

Required Name Type Default
* target String
* destination String
* body String
headers Map<String, String>

No output. Only a log in report if message was successfully sent

Example🔗

1
2
3
4
5
6
7
8
JmsSenderAction(
    target = "JMS_TARGET",
    destination = "jms/domain/my/queue",
    body = "my text body"
    attributes = mapOf(
        "jms.MyProperty" to "some value"
    )
)
1
2
3
4
5
6
7
8
JakartaSenderAction(
    target = "JMS_TARGET",
    destination = "jms/domain/my/queue",
    body = "my text body"
    attributes = mapOf(
        "jms.MyProperty" to "some value"
    )
)

Listener🔗

Browse JMS or Jakarta implementation

  • Only works on TextMessage
  • selector used as message filter in createConsumer (JMS / Jakarta) or in createBrowser (JMS / Jakarta)
  • bodySelector verify in browserMaxDepth messages on the queue if it contains bodySelector characters
Required Name Type Default
* target String
* destination String
selector String
bodySelector String
browserMaxDepth Integer
timeOut Duration (String) 500 ms
Name Type
textMessage String
jmsProperties Map

Example🔗

1
2
3
4
5
6
7
8
JmsListenerAction(
    target = "JMS_TARGET",
    destination = "jms/domain/my/queue",
    selector = "type = 'boat' AND color = 'red'",
    bodySelector = "some value to search in message",
    browserMaxDepth = 100,
    timeOut = "1 s"
)
1
2
3
4
5
6
7
8
JakartaListenerAction(
    target = "JMS_TARGET",
    destination = "jms/domain/my/queue",
    selector = "type = 'boat' AND color = 'red'",
    bodySelector = "some value to search in message",
    browserMaxDepth = 100,
    timeOut = "1 s"
)

Clean Queue🔗

Browse JMS or Jakarta implementation

  • selector used as message filter in createConsumer (JMS / Jakarta) or in createBrowser (JMS / Jakarta)
  • bodySelector verify in browserMaxDepth messages on the queue if it contains bodySelector characters (only works on TextMessage)
Required Name Type Default
* target String
* destination String
selector String
bodySelector String
browserMaxDepth Integer
timeOut Duration (String) 500 ms

No output. Only a log in report with number of messages removed

Example🔗

1
2
3
4
5
6
7
8
JmsCleanQueueAction(
    target = "JMS_TARGET",
    destination = "jms/domain/my/queue",
    selector = "type = 'boat' AND color = 'red'",
    bodySelector = "some value to search in message",
    browserMaxDepth = 100,
    timeOut = "1 s"
)
1
2
3
4
5
6
7
8
JakartaCleanQueueAction(
    target = "JMS_TARGET",
    destination = "jms/domain/my/queue",
    selector = "type = 'boat' AND color = 'red'",
    bodySelector = "some value to search in message",
    browserMaxDepth = 100,
    timeOut = "1 s"
)