Previous Topic: TIMEZONE Statement—Specify a Time ZoneNext Topic: TRANSFERCODETYPE Statement—Specify the FTP Format


TOPIC Statement—Specify Whether to Publish or Subscribe to a Topic or Queue

The TOPIC statement specifies whether the job sends messages to a topic or queue in a JMS Subscribe job or publishes messages to a topic or queue in a JMS Publish job.

Supported Job Types

This statement is required for the following job types:

Syntax

This statement has the following format:

TOPIC Y|N
Y

Sends or publishes messages to a topic.

N

Sends or publishes messages to a queue.

Example: Publish a Message to a Queue

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.