Previous Topic: DESTINATIONNAME Statement—Specify the JNDI Name of the Topic or QueueNext Topic: DIRECTION Statement—Specify the Transfer Direction


DESTNAME Statement—Specify the JNDI Name of the Topic or Queue

The DESTNAME statement specifies the JNDI name of the topic or queue in a JMS job.

Note: Topics are not supported on IBM WebSphere or IBM WebSphere MQ.

Supported Job Types

This statement is required for the following workload objects:

Syntax

This statement has the following format:

destination

Specifies the JNDI name of the topic or queue. The job uses the JNDI name to indicate the destination where messages are received.

Limits: Up to 256 characters; case-sensitive

CONTINUOUS(alertid)

(Optional) Specifies the identifier of an alert to be triggered when a message matches the filter condition in a JMS Subscribe job. Defines the job as continuous. To end continuous monitoring, you must complete the job manually or cancel it. If you do not specify this operand, the job completes when the agent detects the filter value. The agent ignores all messages that do not match the filter.

alertid

Specifies the alert identifier to be triggered.

Limits: 1-8 alphanumeric characters; the first character must be alphabetic

Note: The alert must have been previously defined to the scheduling manager. Not all scheduling managers support the CONTINUOUS operand.

Notes:

Example: Publish a Message to a Queue on a WebSphere MQ Server

This example publishes the message "this is my message" to the queue named Queue. The Java class of the message is String. The initial context factory supplied by the JNDI service provider is com.ibm.websphere.naming.WsnInitialContextFactory. The service provider's URL is iiop://172.24.0.0:2809, where 172.24.0.0 is the IP address of the WebSphere MQ server and 2809 is the ORB port. The job uses the cyberuser JNDI user ID to gain access to the connection factory named ConnectionFactory.

AGENT APPAGENT
INITIAL_CONTEXT com.ibm.websphere.naming.WsnInitialContextFactory
LOCATION iiop://172.24.0.0:2809
CONNECTION_FACTORY ConnectionFactory
DESTNAME Queue
TOPIC N
MSGCLASS String
JNDIUSER cyberuser
PARAMETER TYPE(java.lang.String) VALUE('this is my message')

Note: The agent does not support JMS messaging on IBM WebSphere. If you have IBM WebSphere MQ, your agent administrator can set up the agent plug-in to run JMS Publish and JMS Subscribe for JMS queues. JMS topics are not supported on IBM WebSphere MQ.

Example: Monitor a Queue on a WebLogic Application Server

This example continuously monitors the queue named Queue (residing on WebLogic) for messages matching the filter criteria. The consumed messages from the queue are stored in the file /export/home/user1/outputfile1. The service provider's URL is t3://172.24.0.0:7001, where 172.24.0.0 is the IP address of the WebLogic Application server and 7001 is the ORB port.

AGENT APPAGENT
INITIAL_CONTEXT weblogic.jndi.WLInitialContextFactory
LOCATION t3://172.24.0.0:7001
CONNECTION_FACTORY ConnectionFactory
DESTNAME Queue CONTINUOUS(a13)
FILTER abc\s...\s[a-zA-Z]+\sFilter![\sa-z0-9]+
TOPIC N
DESTINATION /export/home/user1/outputfile1
JNDIUSER cyberuser

In this example, the regular expression used as the filter criteria can be defined as follows:

abc\s...\s[a-zA-Z]+\sFilter![\sa-z0-9]+
abc\s

Specifies the text abc, followed by white space.

...\s

Specifies any three characters, followed by white space.

[a-zA-Z]+\s

Specifies at least one letter, followed by white space.

Filter![\sa-z0-9]+

Specifies the text Filter!, followed by at least one of the following: white space or digit or lower case letter.

Example: abc vvv B Filter! 95