Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

JMSFragment

JMSFragment supports the following attributes: 

AttributeUsageDescription
client_idOptional

The client identifier for this connection.

See: Connection.setClientID

destinationOptional

A Destination object encapsulates a provider-specific address.

Possible values:

  • Queue
  • Topic.

See: Destination


Default: Queue

destination_nameDependentDepending on use The name of either the destination attribute the name of the queue or topic is specifiedaccording to the setting made for the destination attribute.
acknowledge_modeOptional

Session acknowledgment mode.

Possible values: 

  • Session.AUTO_ACKNOWLEDGE
  • Session.CLIENT_ACKNOWLEDGE
  • Session.AUTO_ACKNOWLEDGE

See: Session


Default: Session.CLIENT_ACKNOWLEDGE

delivery_modeOptional

Delivery mode.

Possible values: 

  • DeliveryMode.NON_PERSISTENT
  • DeliveryMode.PERSISTENT

See:


Default: DeliveryMode.PERSISTENT

priorityOptional

The producer's default priority.

See: MessageProducer.setPriority


Default: 4

time_to_liveOptional

Sets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.

See: MessageProducer.setTimeToLive

Possible values:

  • <n> - duration in milliseconds
    • e.g.: 60000
  • <n>s - duration in seconds
    • e.g.: 30s
  • <n>m - duration in minutes
    • e.g.: 30m
  • <n>h - duration in hours
    • e.g.: 24h
  • <n>d - duration in days
    • e.g.: 30d
  • <n>w - duration in weeks
    • e.g.: 4w
  • Combined values (with blank space as separator):
    • e.g.: 1w 1d 1h

Default: 0

...

ElementElement descriptionDescription
MessageRequired, only once inside of JMSFragment elementBody of a JMS notification

ConnectionFactory

Specifies use of a JMS ConnectionFactory implementation.

...

ElementElement descriptionDescription
ConstructorArgumentsOptional or only once inside of ConnectionFactory element  

 ConstructorArguments

The following elements can be nested inside a ConstructorArguments element:

...

Code Block
languagexml
titleExample: ActiveMQConnectionFactory with 3 constructor arguments
collapsetrue
...
<ConnectionFactory java_class="org.apache.activemq.ActiveMQConnectionFactory">
    <ConstructorArguments>
        <Argument type="java.lang.String"><![CDATA[my_user_name]]></Argument>
        <Argument type="java.lang.String"><![CDATA[my_password]]></Argument>
        <Argument type="java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument>
    </ConstructorArguments>
</ConnectionFactory>
...

 Argument

 Argument supports the following attributes: 

...

Code Block
languagexml
titleExample
collapsetrue
...
<Argument type="java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument>
...

ConnectionJNDI

Specifies use of a JNDI properties file to create a JNDI InitialContextFactory.

...

Code Block
languagetext
titleExample: content of the JNDI properties file for ActiveMQ
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://localhost:61616 

Message

Body of a JMS notification. Any Any JS7 - Notification - Configuration, Monitor Variables can be used with the body.

Example for Apache ActiveMQ

Configuration

For use with Apache ActiveMQ a JMSFragment configuration can look like this:

Code Block
languagetext
titleExample: JMSFragment Configuration
<JMSFragment acknowledge_mode="Session.CLIENT_ACKNOWLEDGE" delivery_mode="DeliveryMode.PERSISTENT" destination="Queue" destination_name="js7" name="js7_on_failure" priority="4" time_to_live="0">
    <MessageRef ref="command_on_failure"/>
    <ConnectionFactory java_class="org.apache.activemq.ActiveMQConnectionFactory" password="admin" user_name="admin">
        <ConstructorArguments>
            <Argument type="java.lang.String"><![CDATA[tcp://activemq-5-15:61616]]></Argument>
        </ConstructorArguments>
    </ConnectionFactory>
</JMSFragment>

Client Libraries

The JS7 does not ship with client libraries for specific JMS server products such as Apache ActiveMQ, Apache Kafka and others.

Instead, users have to provide a version of the libraries that match their JMS server product.