Destination element

IBMStreams com.ibm.streamsx.messaging Toolkit > com.ibm.streamsx.messaging 5.4.3 > Connection specifications document > Access_specification element > Destination element

The <destination> element specifies the queue or topic that is used by the Messaging Toolkit operators. The element also specifies some parameters that control the behavior of the operator.

For WebSphere MQ, the <destination> element does not actually contain this information, instead it specifies the information indirectly by referencing an XMS or JMS administered object that is held in an external directory service. For Apache ActiveMQ, the <destination> element can directly refer to a queue or a topic.

The following example shows an access specification that contains a <destination> element for the WebSphere MQ messaging system:

<access_specifications>
  <access_specification name="Outtrading22">
    <destination identifier="TestDestination2" delivery_mode="persistent"
    message_class="stream"/>
    <uses_connection connection="wbe2" />
    <native_schema>
      <attribute name="cntr" type="Long"/>
    </native_schema>
  </access_specification>
</access_specifications>

The following example shows an access specification that contains a <destination> element that directly refers to an ActiveMQ queue:

<access_specifications>
  <access_specification name="amqAccess">
    <destination identifier="dynamicQueues/MapQueue" 
    delivery_mode="persistent" message_class="stream" />
    <uses_connection connection="amqConn"/>
    <native_schema>
      <attribute name="cntr" type="Long" />
    </native_schema>
  </access_specification>
</access_specifications>
The <destination> element has three attributes:
  • identifier
    • This attribute value is the name of the destination administered object that is used. In particular, it is an administered object within the directory service context that is specified by the initial_context attribute in the connection specification. The destination administered object can be either a JMS queue object or a JMS topic object. This attribute is required.
    • If the messaging provider is Apache ActiveMQ, this attribute can represent the queue or topic that must be created when accessing the messaging provider.
  • delivery_mode
    • This attribute value specifies the quality of service that is applied by the messaging provider, if it is not overridden by the messaging provider administration. The value can be persistent or non_persistent, as defined by the JMS specification. If this attribute is not specified, the default value is non_persistent.
  • message_class
    • This attribute value specifies how a stream tuple is serialized into a WebSphere MQ or an Apache ActiveMQ message. It operates with the <native_schema> element. The value can be: bytes, empty, map, stream, text, wbe, wbe22, or xml.
Message class formats in the Messaging Toolkit