Creating publishing queue maps
When you create publications, you specify which IBM® MQ queue to send the data to by associating each publication with a publishing queue map. You can create a publishing queue map before you begin creating publications or as one of the steps while you are creating publications.
Before you begin
- Plan how you want to group publishing queue maps and publications.
- On the server that contains the source tables for the publications, create the control tables for the Q Capture program.
- Ensure that you have defined the appropriate objects in MQ.
Restrictions
The same send queue cannot be used for both Q Replication and Event Publishing because a send queue can transport compact messages (for Q Replication) or XML or delimited messages (for Event Publishing), but not both.
Procedure
| Method | Description |
|---|---|
| ASNCLP command-line program | Use the CREATE PUBQMAP command. For example, the following
commands set the environment and create a publishing queue map SAMPLE_EP1_TO_SUBSCRIBER: |
| Replication Center | Use the Create Publishing Queue Map window. To open the window, expand the Q Capture schema that identifies the Q Capture program that uses the queue map. Right-click the Publishing Queue Maps folder and select Create. |
When you create a publishing queue map, you specify the following options:
- Send queue
- The MQ queue where the Q Capture program sends source data and informational messages.
- Message content
- You can specify for the Q Capture program to send messages that
contain either of the following types of content:
- Individual row operations. (This type of message from the Q Capture program is called a row operation message.)
- Full transactions. (This type of message from the Q Capture program is called a transaction message.)
For LOB data types: Regardless of which option that you choose, LOB data types are sent separately as individual physical messages that are associated with either the transaction message or row operation message.
- Maximum message length
- The maximum size of a message (in kilobytes) that the Q Capture program can put on this send queue. This maximum message length must be equal to or less than the MQ maximum message size attribute (MAXMSGL) that is defined for the queue or queue manager.
- Queue error action
- The actions that the Q Capture program takes when a send queue
is no longer accepting messages because of an error, for example when
the queue is full:
- Stops running
- Stops putting messages on the queue in error but continues to put messages on other queues
- Heartbeat interval
- How often, in milliseconds,
that the Q Capture program sends messages on this queue to tell the
user application that the Q Capture program is still running when
there are no changes to publish. The heartbeat message is sent on
the first commit interval after the heartbeat interval expires. A
value of 0 tells the Q Capture program not to send heartbeat messages. Note: This heartbeat interval is different from the MQ parameter HBINT (heartbeat interval) that you can define for an MQ channel.
- Code page conversion errors
- Whether character data is published when the data causes a code page conversion error. By default, no data is sent for the character field that failed code page conversion for XML messages. For delimited message format, by default none of the data from character columns in the row is sent when any single character field in the row fails code page conversion. Instead, all the character columns are sent as null values. Check the box to specify that hexadecimal values be send rather than null values.
- Message header
- Whether to include a JMS-compliant (MQRFH2) header in all messages that are put on the send queue. When you create a publication that uses the send queue, you can specify a topic for the topic field in the header. A topic is a character string that describes the nature of the data that is published.
- Delimited format
- Whether you want the Q Capture program to publish messages in
delimited format. You can accept the default delimiters for column,
character data, new lines, and decimals, or use the four fields to
specify your own delimiters.
If you specify your own delimiters, each of the delimiter fields must have a different value. You can select from the drop-down lists of valid delimiters, type a character, or type a character code point. In a character code point, you use the syntax 0xJJ or XJJ where JJ is the hexadecimal representation of the code point. For example, for the delimiter # you can use #, 0x23, or X23.
- Code page for publishing delimited messages
- Displays the code page that the Q Capture program uses to publish delimited messages. If this code page differs from the code page of the source table, the Q Capture program will convert the data. To avoid code page conversion, specify the code page that is used for the source table.
- Column delimiter
- Specifies a delimiter to separate the values in each column of the source table. The default delimiter is a comma (,). A null column value is represented by two consecutive column delimiters.
- Character string delimiter
- Specifies a delimiter to enclose all character data. The default delimiter is a double quotation mark ("). If the character data contains its delimiter, the delimiter is escaped by prefixing it with the same delimiter.
- New line value
- Specifies a new-line delimiter to separate the change-data records in one message. The default is a line feed (LF).
- Decimal value
- Specifies a character to use for the decimal point. The default is a period (.).