CREATE PUBQMAP command

Use the CREATE PUBQMAP command to create a publishing queue map that specifies the send queue to use for event publishing and whether to send messages in XML or delimited format.

Syntax

Read syntax diagramSkip visual syntax diagramCREATE PUBQMAPqmapname DESC"description"USING SENDQ"sendqname" MESSAGE FORMATXMLxml-format-optionsDELIMITEDdel-format-options
xml-format-options
Read syntax diagramSkip visual syntax diagramMESSAGE CONTENT TYPE T RERROR ACTIONSQHEARTBEAT INTERVALintervalMAX MESSAGE SIZEsizeHEADERNONEMQRFH2ON CODEPAGE ERRORSEND NO DATASEND RAW DATA
del-format-options
Read syntax diagramSkip visual syntax diagramMESSAGE CONTENT TYPE T RERROR ACTIONSQHEARTBEAT INTERVAL0MAX MESSAGE SIZEsizeON CODEPAGE ERRORSEND NO DATASEND RAW DATA

Parameters

qmapname
Specifies the name of the publishing queue map.
DESC "description"
Specifies the description of the publishing queue map.
SENDQ "sendqname"
Specifies the name of the IBM® MQ queue to use as the send queue.
MESSAGE FORMAT
Specifies whether you want to publish messages in XML format or delimited format. Use this keyword if you want to specify options for the publishing queue map; the options differ for the different message format types.
MESSAGE CONTENT TYPE
Specifies whether messages put on the queue will contain an entire database transaction or only a row operation.
T
Messages contain all of the row operations (update, insert, or delete) within a Db2® transaction, and information about the transaction. This is the default.
R
Messages contain a single update, insert, or delete operation, and information about the Db2 transaction to which it belongs.
ERROR ACTION
The action that the Q Capture program takes when the send queue stops accepting messages. For example, the queue might be full, or the queue manager might have reported a severe error for this queue.
S
The Q Capture program stops.
Q
The Q Capture program stops putting messages on any send queues that are in error and continues putting messages on other send queues.
HEARTBEAT INTERVAL interval
XML format only: Specifies the interval (in seconds) between heartbeat messages that are sent by the Q Capture program to a subscribing application when there are no transactions to publish. To disable heartbeat messages, set the heartbeat interval to 0. Heartbeat messages are not supported for the delimited message format, so the value of this keyword is always 0 for delimited format.
MAX MESSAGE SIZE size
Specifies the maximum size (in kilobytes) of the buffer used for sending messages over the send queue.
HEADER
Specifies whether you want a JMS-compliaint MQRFH2 header added to all messages that use the send queue that is specified in this publishing queue map. This keyword is not supported for delimited message format.
NONE
Specify to send only the publication message with no special headers.
MQRFH2
Specify to attach a special header to the message that will contain the topic name that you specify as part of an publication.
ON CODEPAGE ERROR
Specifies whether you want to send data when code page conversion errors occur.
SEND NO DATA
The Q Capture program does not send character data when an error occurs during code page conversion.
SEND RAW DATA
The Q Capture program sends a hexidecimal representation of character data if a code page conversion error occurs.

Example 1

To create a publishing queue map SAMPLE_ASN1_TO_SUBSCRIBER that sets the message content type to row, specifies 5 seconds between heartbeat messages, and sets a maximum message size of 128 KB:
CREATE PUBQMAP SAMPLE_ASN1_TO_SUBSCRIBER USING 
SENDQ "ASN1.QM1.PUBDATAQ" MESSAGE CONTENT TYPE R 
HEARTBEAT INTERVAL 5 MAX MESSAGE SIZE 128

Example 2

To create a publishing queue map SAMPLE_ASN_TO_DATASTAGE that sets the message format to delimited, the message type to row, and a maximum message size of 256 KB:
CREATE PUBQMAP SAMPLE_ASN_TO_DATASTAGE
USING SENDQ "ASN.QM1.DELIMDATAQ" MESSAGE FORMAT DELIMITED
MESSAGE CONTENT TYPE R HEARTBEAT INTERVAL 0 MAX MESSAGE SIZE 256