Multicast and the MQI
Use this information to understand the major Message Queue Interface (MQI) concepts and how they relate to IBM MQ Multicast.
Multicast subscriptions are nondurable; because there are no physical queues involved, there is nowhere to store the offline messages that are created by durable subscriptions.After an application has subscribed to a multicast topic, it is given back an object handle which it can consume or MQGET from, as if it were a handle to a queue. This means that only managed multicast subscriptions (subscriptions created with MQSO_MANAGED) are supported, that is; it is not possible to make a subscription and 'point' the messages at a queue. This means that messages must be consumed from the object handle returned on the subscription call. On the client, the messages are stored in a message buffer until they are consumed by the client; see MessageBuffer stanza of the client configuration file for more information. If the client does not keep up with the publishing rate, the messages are discarded as required, with the oldest messages discarded first.
It is normally an administration decision whether an application uses Multicast or not, specified by setting the MCAST attribute of a TOPIC object. If a publishing application must ensure that multicast is not used, it can use the MQOO_NO_MULTICAST option. Similarly, a subscribing application can ensure that multicast is not used by subscribing with the MQSO_NO_MULTICAST option.
IBM MQ Multicast supports the use of message selectors. A selector is used by an application to register its interest in only those messages with properties that satisfy the SQL92 query that the selection string represents. For more information about message selectors, see Selectors.
The following table lists all the major MQI concepts and how they relate to Multicast:MQI Concept | Action when tried using multicast | Reason code |
---|---|---|
Put a zero length message | Rejected | 2005 (07D5) (RC2005): MQRC_BUFFER_LENGTH_ERROR |
Grouping | Rejected | 2046 (07FE) (RC2046): MQRC_OPTIONS_ERROR |
Segmentation | Rejected | 2443 (098B) (RC2443): MQRC_SEGMENTATION_NOT_ALLOWED |
Distribution lists | Rejected | 2154 (086A) (RC2154): MQRC_RECS_PRESENT_ERROR |
MQINQ | Rejected for topics handles: MQINQ and MQSET of topics is not supported. | 2038 (07F6) (RC2038): MQRC_NOT_OPEN_FOR_INQUIRE |
MQINQ | Accepted for managed handle. Only Current Depth can be inquired. |
|
MQSET | Rejected for all handles. | 2040 (07F8) (RC2040): MQRC_NOT_OPEN_FOR_SET |
Transactions (XA or not) | Rejected | 2072 (0818) (RC2072): MQRC_SYNCPOINT_NOT_AVAILABLE |
Message browse | Rejected | 2036 (07F4) (RC2036): MQRC_NOT_OPEN_FOR_BROWSE |
Lock messages | Rejected | 2046 (07FE) (RC2046): MQRC_OPTIONS_ERROR |
Browse with mark | Rejected | 2036 (07F4) (RC2036): MQRC_NOT_OPEN_FOR_BROWSE |
Pass context | Rejected | 2046 (07FE) (RC2046): MQRC_OPTIONS_ERROR |
MQPUT1 | Rejected. It is invalid to try and MQPUT1 to a Multicast only topic. | 2560 (0A00) (RC2560): MQRC_MULTICAST_ONLY |
Durable subscription | Rejected if the topic is marked as "Multicast only", otherwise a non-Multicast subscription is made. | 2436 (0984) (RC2436): MQRC_DURABILITY_NOT_ALLOWED |
TopicString > 255 | Rejected. If the topic string is greater than 255 characters, it is rejected in the client. | 2425 (0979) (RC2425): MQRC_TOPIC_STRING_ERROR |
Non-managed subscription made | Rejected if the topic is marked as "Multicast only", otherwise a non-Multicast subscription is made. | 2046 (07FE) (RC2046): MQRC_OPTIONS_ERROR |
MQPMO_NOT_OWN_SUBS | Rejected | 2046 (07FE) (RC2046): MQRC_OPTIONS_ERROR |
- Message persistence
- For nondurable multicast subscribers, persistent messages from the publisher are delivered in an unrecoverable fashion.
- Message truncation
- Message truncation is supported, which means that it is possible for an application to:
- Issue an MQGET.
- Get MQRC_TRUNCATED_MSG_FAILED.
- Allocate a larger buffer.
- Reissue the MQGET to retrieve the message.
- Subscription expiry
- Subscription expiry is not supported. Any attempt to set an expiry is ignored.
Parent topic: Multicast programming