Properties of HTTP Requests to Send Messages from REST Clients
This section provides information about properties of HTTP requests to send messages from REST clients.
Topics:
Request Parameters
This section provides information about request parameters which can be used when sending messages using the REST API.
correlationId
Optional. No default.
This parameter is used to group together (correlate) multiple messages.
For the query string parameter correlationId
, the equivalent HTTP header is X-OC-CORRELATION-ID
.
deliveryMode
Optional. If present, value must be persistent
or non_persistent
; default is persistent
. Determines whether the message is persistent (that is, stored by the JMS broker in persistent storage until delivered).
For the query string parameter deliveryMode
, the equivalent HTTP header is X-OC-DELIVERY-MODE
.
messageType
Optional; if omitted, the default is HTTP. This parameter specifies the type of JMS message the HTTP request will cause to be generated. Depending on the value, there may be restrictions on the HTTP request body, and/or special interpretation of that body and/or some of the standard HTTP request parameters.
For the query string parameter messageType
, the equivalent HTTP header is X-OC-MESSAGE-TYPE
.
See Message Types for information about the valid values for the messageType
query string parameter along with any required formatting for the HTTP request body.
replyTo
Optional. If present, must have one of the following forms:
-
/queues/
queueName
-
/temporaryQueues/
queueName
-
/topics/
topicName
-
/temporaryTopics/
topicName
Specifies a destination or a temporary destination to which replies should be sent.
For the query string parameter replyTo
, the equivalent HTTP header is X-OC-REPLY-TO.
ttl
Optional. If present, value must be a strictly positive long integer or the value maximum
. Determines the time in milliseconds between when the message is dispatched and when the service may delete it if not yet delivered. The semantics of these parameters is the same as the corresponding parameters for producers, but the default is defined by the producer, and is overridden by any headers occurring in this operation.
For the query string parameter ttl
, the equivalent HTTP header is X-OC-TTL.
HTTP Headers to Specify Message Properties
The HTTP request headers (when sending messages) can specify messaging properties for the message being sent.
X-OC-propertyType
-PROPERTY-propertyName
Optional. This is not a single header, but a family of headers, referred to collectively as message property headers, one for each property type and property name. The property name value should consist of alphanumeric characters and underscores, and is made lower-case by the service. This sets the message property with name property name on the message to value property value, if the property type is one of the allowed values and property value is a value allowed for the property type. See Message Headers and Properties for information about the allowed values of property type.
Limitations on Message Size
Oracle Messaging Cloud Service only allows messages with at most 3K (3072) characters of messaging-relevant HTTP request headers and at most 512K (524,288) bytes or characters of HTTP request body. An attempt to send a message that exceeds these limits will generate an error response, and no message will be sent. Details of this limitation are as follows:
-
An HTTP request header is messaging-relevant if its name begins with
X-OC-
(case-insensitive); if the message type isHTTP
, or is not supplied (in which case it defaults toHTTP
), theContent-Type
andContent-Language
headers are also messaging-relevant. -
The number of characters in a messaging-relevant header is the sum of the number of characters in the header name and the number of characters in the header value.
-
If the message has no type, or has type
BYTES
,OBJECT
, orHTTP
, the size of the HTTP request body is measured in bytes, and is counted as in the HTTP specification. -
If the message has type
TEXT
,MAP
, orSTREAM
, the size of the HTTP request body is measured in characters according to the character encoding. -
If the message has type
PLAIN
, the request body is ignored, and so has size 0 for purposes of size limitations.
Note:
-
To send a message that is larger than 512 KB, see Using Message Groups. This enables you to send messages/files up to 10 MB size in smaller chunks.
-
To send larger message payload, you can use Oracle Storage Cloud Service to store the object and send it as a message. This is especially useful for storing and consuming messages with a message size of up to 5 GB. See Sending Large Objects as Messages Using Oracle Storage Cloud Service