endpoint

Description

MQ – specifies the general syntax and processing for endpoint for WebSphere MQ. Individual options are described in the functions and stored procedures that accept an endpoint argument.

NoteJMS endpoints are opaque to Adaptive Server, and are not inspected for correctness or validity. Instead. they are sent directly to the JMS provider.

Syntax

service_provider_uri ::= 
	provider_name?qmgr=qmgr_name,destination 
provider_name ::=
	local_name | full_name 
		local_name ::= identifier 
		full_name ::=   service_provider_class:service_provider_url 
			service_provider_class ::= ibm_mq 
			service_provider_url ::=
				channel_name/tcp/hostname(port)
					channel_name ::= identifier 
					hostname := identifier 
					port ::= integer 
qmgr_name ::= identifier 
destination ::= [remote_qmgr,]queue=queue_name 
	remote_qmgr ::= remote_qmgr=remote_qmgr_name 
		remote_qmgr_name ::= identifier
	queue_name ::= identifier 

Parameters

local_name

is the name of a registered publisher or subscriber.

qmgr_name

is the name of a MQ queue manager. MQ limits the length of a queue manager name to 48 characters (bytes).

ibm_mq

defines the service provider class. It can be uppecaser or lowercase.

channel_name

is the name of the MQ client channel. MQ limits the length of a channel name to 20 characters (bytes).

tcp

is the transport protocol.

hostname

is the host name of the machine where the MQ listener is running.

port

is the port number where the MQ listener is listening.

NoteYou cannot exceed 264 bytes in the combined length of hostname(port).

queue_name

is the name of a MQ queue. MQ limits the length of a queue name to 48 characters (bytes).

remote_qmgr_name

is the name of the MQ queue manager. MQ limits the length of a queue manager name to 48 characters (bytes).

Use remote_qmgr when there is a remote queue. For example:

ibm_mq:CHANNEL2/TCP/host2(5678)?qmgr=QM2, remote_qmgr=QM3,queue=QM3.QUEUE

In the example:

NoteYou must specify qmgr, remote_qmgr, and queue_name in that order.

The access to the MQ queue is made as the Adaptive Server login user. Unlike the TIBCO JMS support, you cannot specify a user name and password with the endpoint. This means that all Adaptive Server logins that are performing messaging operations must be valid MQ users. Since MQ uses the OS user identities, the Adaptive Server login must also have a user account on the machine where the MQ queue manager is running.

Examples

Example 1

Sends the message, “hello world 1” to a local queue, which is already available on the queue manager once MQ is installed:

select msgsend('hello world 1',
    'ibm_mq:channel1/tcp/host1(5678)?qmgr=QM1,
    queue=SYSTEM.DEFAULT.LOCAL.QUEUE')

Example 2

Sends the message, “hello world 2” to a queue:

select msgsend('hello world 2', 
'ibm_mq:channel2/tcp/host2(5678)?qmgr=QM2,queue=SYSTEM.DEFAULT.QUEUE')

Example 3

Sends the message, “hello world 3” to a queue:

select msgsend('hello world 3', 
'ibm_mq:channel2/tcp/host2(5678)?qmgr=QM2,remote_qmgr=QM3,queue=QM3.Q')