MQPropertyDescriptor.NET class

Use MQPropertyDescriptor as a parameter to MQMessage GetProperty and SetProperty methods. MQPropertyDescriptor describes an MQMessage property.


Class

System.Object
        |
        └─ IBM.WMQ.MQPropertyDescriptor
public class IBM.WMQ.MQPropertyDescriptor extends System.Object;


Properties

Test for MQException being thrown when getting properties.

    public int Context {get; set;}
    The message context the property belongs to. Possible values are:

      MQC.MQPD_NO_CONTEXT
      The property is not associated with a message context.

      MQC.MQPD_USER_CONTEXT
      The property is associated with the user context.

      If the user is authorized, a property associated with the user context is saved when a message is retrieved. A subsequent Put method referencing the saved context, can pass the property into the new message.

    public int CopyOptions {get; set;}

    CopyOptions describes which type of message the property can be copied into.

    When a queue manager receives a message containing an IBM MQ defined property that the queue manager recognizes as being incorrect, the queue manager corrects the value of the CopyOptions field.

    Any combination of the following options can be specified. Combine the options by adding the values, or using bitwise OR.

      MQC.MQCOPY_ALL
      The property is copied into all types of subsequent messages.

      MQC.MQCOPY_FORWARD
      The property is copied into a message being forwarded.

      MQC.MQCOPY_PUBLISH
      The property is copied into the message received by a subscriber when a message is being published.

      MQC.MQCOPY_REPLY
      The property is copied into a reply message.

      MQC.MQCOPY_REPORT
      The property is copied into a report message.

      MQC.MQCOPY_DEFAULT
      The value indicated no other copy options have been specified. No relationship exists between the property and subsequent messages. MQC.MQCOPY_DEFAULT is always returned for message descriptor properties.

      MQC.MQCOPY_NONE
      The same as MQC.MQCOPY_DEFAULT

    public int Options { set; }
    Options defaults to CMQC.MQPD_NONE. We cannot set any other value.

    public int Support { get; set; }
    Set Support to specify the level of support required for IBM MQ-defined message properties. Support for all other properties is optional. Any or none of the following values can be specified

      MQC.MQPD_SUPPORT_OPTIONAL
      The property is accepted by a queue manager even if it is not supported. The property can be discarded in order for the message to flow to a queue manager that does not support message properties. This value is also assigned to properties that are not IBM MQ defined.

      MQC.MQPD_SUPPORT_REQUIRED
      Support for the property is required. If you put the message to a queue manager that does not support the IBM MQ-defined property, the method fails. It returns completion code MQC.MQCC_FAILED and reason code MQC.MQRC_UNSUPPORTED_PROPERTY.

      MQC.MQPD_SUPPORT_REQUIRED_IF_LOCAL

      Support for the property is required, if the message is destined for a local queue. If you put the message to a local queue on a queue manager that does not support the IBM MQ-defined property, the method fails. It returns completion code MQC.MQCC_FAILED and reason code MQC.MQRC_UNSUPPORTED_PROPERTY.

      No check is made if the message is put to a remote queue manager.


Constructors

    PropertyDescriptor();
    Create a property descriptor.

Parent topic: The IBM MQ .NET classes and interfaces