Properties of HTTP Requests and Responses that Deliver Messages

Messages are delivered to clients of the REST API in two ways: in the HTTP response to a receive request, and in an HTTP request made by a message push listener to an HTTP endpoint.

This section describes the headers and body of the responses and requests that describe the message delivered.

For HTTP requests made by message push listeners, some of the characteristics of the requests (the URL pushed to, method used, and so on) are determined by the listener. In addition to the characteristics that are determined by the listener, push requests also have a header X-OC-LISTENER-NAME whose value is the name of the listener from which the push originates.

The remainder of this section describes the aspects of a receive response or push request that are determined by the message:

  • The body of the request or response and its Content-Type, Content-Language, and X-OC-MESSAGE-TYPE headers are as described in Properties of HTTP Requests to Send Messages from REST Clients.

  • The following non-standard headers are set from message headers and properties:

    • X-OC-CORRELATION-ID: message correlation ID

    • X-OC-DELIVERY-MODE: persistent or non_persistent. See About Persistent and Non-Persistent Messages.

    • X-OC-DESTINATION: One of the following values is set for this header.

      • /queues/name of the queue to which the message was sent

      • /topics/name of the topic to which the message was sent

      • /temporaryQueues/name of the temporary queue to which the message was sent

      • /temporaryTopics/name of the temporary topic to which the message was sent

    • X-OC-EXPIRATION: message expiration time. This is a long integer interpreted as Unix time.

    • X-OC-MESSAGE-ID: message's ID, if present

    • X-OC-PRIORITY: message priority

    • X-OC-REDELIVERED: true/false, indicating if message is a re-delivery

    • X-OC-REPLY-TO: One of the following values is set for this header.

      • /queues/name of the queue to which to reply

      • /topics/name of the topic to which to reply

      • /temporaryQueues/name of the temporary queue to which to reply

      • /temporaryTopics/name of the temporary topic to which to reply

    • X-OC-TIMESTAMP: time at which message was handed off to the JMS broker, if present. This is a long integer interpreted as Unix time.

    • X-OC-LISTENER-NAME: name of the listener that pushed the message

    • X-OC-DELIVERY-COUNT: value of the message's JMSXDeliveryCount property, if present. This is the number of times the service has attempted to deliver this message. The value of this parameter can be 2 or higher if, for example, the message has been received in a transacted session but the receive was not committed.

    • X-OC-GROUP-ID: the name of the message group of which this message is a part, if any. This is the value of the JMSXGroupId property, with characters that are not legal in an HTTP header value escaped. The group of a message is set by the client when the message is sent. The value of this header, if present, will be an escaped value String. For more information on escaped value Strings, see About Escaped Value Strings.

    • X-OC-GROUP-SEQ:sequence number of the message within a message group, if present. The value will be an integer. This is the value of the JMSXGroupSeq property. The sequence number is set by the client when the message is sent.

    • For each message property, a header

      X-OC-property type-PROPERTY-property name: property value

      for properties whose names and values conform to the HTTP specification for headers, with the property type determined by the type of the Message's properties; for header names and values that do not, a header of the form

      X-OC-GENERAL-property type-PROPERTY-property name as pairs of hex digits: property value as pairs of hex digits
      
      

      Any message property with value null is not expressed as a property header.

      See Message Headers and Properties for information about message headers and HTTP headers, and message property types.