MQPutMessageOptions.NET class

Use MQPutMessageOptions to specify how messages are sent. It modifies the behavior of MQDestination.Put.


Class

System.Object
        |
        └─ IBM.WMQ.MQBase
                |
                └─ IBM.WMQ.MQBaseObject
                        |
                        └─ IBM.WMQ.MQPutMessageOptions
public class IBM.WMQ.MQPutMessageOptions extends IBM.WMQ.MQBaseObject;


Properties

Test for MQException being thrown when getting properties.

Note: The behavior of some of the options available in this class depends on the environment in which they are used. These elements are marked with an asterisk, *.

    public MQQueue ContextReference {get; set;}

    If the options field includes MQC.MQPMO_PASS_IDENTITY_CONTEXT or MQC.MQPMO_PASS_ALL_CONTEXT, set this field to refer to the MQQueue from which to take the context information.

    The initial value of this field is null.

    public int InvalidDestCount {get;} *

    Generally, used for distribution lists, InvalidDestCount indicates the number of messages that could not be sent to queues in a distribution list. The count includes queues that failed to open and also the queues that were opened successfully, but for which the put operation had failed.

    .NET does not support distribution lists, but InvalidDestCount is set when opening a single queue.

    public int KnownDestCount {get;} *

    Generally used for distribution lists, KnownDestCount indicates the number of messages that the current call has sent successfully to queues that resolve to local queues.

    .NET does not support distribution lists, but InvalidDestCount is set when opening a single queue.

    public int Options {get; set;}
    Options that control the action of MQDestination.put and MQQueueManager.put. Any or none of the following values can be specified. If more than one option is required, the values can be added or combined using the bitwise OR operator.

      MQC.MQPMO_ASYNC_RESPONSE
      This option causes the MQDestination.put call to be made asynchronously, with some response data.

      MQC.MQPMO_DEFAULT_CONTEXT
      Associate default context with the message.

      MQC.MQPMO_FAIL_IF_QUIESCING
      Fail if the queue manager is quiescing.

      MQC.MQPMO_LOGICAL_ORDER *
      Put logical messages and segments in message groups into their logical order.
      If we use the MQPMO_LOGICAL_ORDER option in a reconnectable client, the MQRC_RECONNECT_INCOMPATIBLE reason code is returned to the application.

      MQC.MQPMO_NEW_CORREL_ID *
      Generate a new correlation ID for each sent message.

      MQC.MQPMO_NEW_MSG_ID *
      Generate a new message ID for each sent message.

      MQC.MQPMO_NONE
      No options specified. Do not use with other options.

      MQC.MQPMO_NO_CONTEXT
      No context is to be associated with the message.

      MQC.MQPMO_NO_SYNCPOINT
      Put a message without sync point control. If the sync point control option is not specified, a default of no sync point is assumed.

      MQC.MQPMO_PASS_ALL_CONTEXT
      Pass all context from an input queue handle.

      MQC.MQPMO_PASS_IDENTITY_CONTEXT
      Pass identity context from an input queue handle.

      MQC.MQPMO_RESPONSE_AS_Q_DEF

      For an MQDestination.put call, this option takes the put response type from DEFPRESP attribute of the queue.

      For an MQQueueManager.put call, this option causes the call to be made synchronously.

      MQC.MQPMO_RESPONSE_AS_TOPIC_DEF
      MQC.MQPMO_RESPONSE_AS_TOPIC_DEF is a synonym for MQC.MQPMO_RESPONSE_AS_Q_DEF for use with topic objects.

      MQC.MQPMO_RETAIN

      The publication being sent is to be retained by the queue manager. If this option is used and the publication cannot be retained, the message is not published and the call fails with MQC.MQRC_PUT_NOT_RETAINED.

      Request a copy of this publication after the time it was published, by calling the MQSubscription.RequestPublicationUpdate method. The saved publication is sent to applications that create a subscription without setting the MQC.MQSO_NEW_PUBLICATIONS_ONLY option. Check the MQIsRetained message property of a publication, when it is received, to find out if it was the retained publication.

      When retained publications are requested by a subscriber, the subscription used might contain a wildcard in the topic string. If there are multiple retained publications in the topic tree that match the subscription, they are all sent.

      MQC.MQPMO_SET_ALL_CONTEXT
      Set all context from the application.

      MQC.MQPMO_SET_IDENTITY_CONTEXT
      Set identity context from the application.

      MQC.MQPMO_SYNC_RESPONSE
      This option causes the MQDestination.put or MQQueueManager.put call to be made synchronously, with full response data.

      MQC.MQPMO_SUPPRESS_REPLYTO
      Any information filled into the ReplyToQueueName and ReplyToQueueManagerName fields of the publication is not passed on to subscribers. If this option is used in combination with a report option that requires a ReplyToQueueName, the call fails with MQC.MQRC_MISSING_REPLY_TO_Q.

      MQC.MQPMO_SYNCPOINT
      Put a message with sync point control. The message is not visible outside the unit of work until the unit of work is committed. If the unit of work is backed out, the message is deleted.

    public int RecordFields {get; set;} *

    Information about distribution lists. Distribution lists are not supporting in .NET.

    public string ResolvedQueueManagerName {get;}

    An output field set by the queue manager to the name of the queue manager that owns the queue specified by the remote queue name. ResolvedQueueManagerName might be different from the name of the queue manager from which the queue was accessed if the queue is a remote queue.

    A nonblank value is returned only if the object is a single queue. If the object is a distribution list or a topic, the value returned is undefined.

    public string ResolvedQueueName {get;}

    An output field that is set by the queue manager to the name of the queue on which the message is placed. ResolvedQueueName might be different from the name used to open the queue if the opened queue was an alias or model queue.

    A non-blank value is returned only if the object is a single queue. If the object is a distribution list or a topic, the value returned is undefined.

    public int UnknownDestCount {get;} *

    Generally used for distribution lists, UnknownDestCount is an output field set by the queue manager. It reports the number of messages that the current call has sent successfully to queues that resolve to remote queues.

    .NET does not support distribution lists, but InvalidDestCount is set when opening a single queue.


Constructors

    public MQPutMessageOptions();

    Construct a new MQPutMessageOptions object with no options set, and a blank ResolvedQueueName and ResolvedQueueManagerName.

Parent topic: The IBM MQ .NET classes and interfaces