JMS
Browse implementations
Define a jms 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 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",
}
}
|
- Valid properties are
username
or user
. Set this for basic authentication
- Valid properties are
userPassword
or password
. Set this for basic authentication
Jms Sender
No output. Only a log in report if message was successfully sent
Example
| JmsSenderAction(
target = "JMS_TARGET",
destination = "jms/domain/my/queue",
body = "my text body"
attributes = mapOf(
"jms.MyProperty" to "some value"
)
)
|
Jms Listener
- Only works on javax.jms.TextMessage
selector
used as message filter in createConsumer or in createBrowser
bodySelector
verify in browserMaxDepth
messages on the queue if it contains bodySelector
characters
Example
| 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"
)
|
Jms Clean Queue
- Only works on javax.jms.TextMessage
selector
used as message filter in createConsumer or in createBrowser
bodySelector
verify in browserMaxDepth
messages on the queue if it contains bodySelector
characters (only works on javax.jms.TextMessage)
No output. Only a log in report with number of messages removed
Example
| 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"
)
|