Browse Messages

post

/queueBrowsers/{browserName}

Return the next message in the browser's listing, or a null response is returned.

Request

Path Parameters
Back to Top

Response

200 Response

The message as an HTTP response.  If there is an X-OC-NULL header with value true, then it indicates that there are no more messages in the browser.

404 Response

Error Codes

  • queueBrowserNotFound:The requested queue browser does not exist.

500 Response

Error Codes

  • operationFailed:A low-level exception occurred in attempting to obtain the next message.
Back to Top

Examples

cURL Command

Each POST to the created Queue Browser will return the next message in the Queue starting with the head of the queue when the browser was created.

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/queueBrowsers/myFirstBrowser"
# First message.

curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/queueBrowsers/myFirstBrowser"
# Second message.

curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X POST "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/queueBrowsers/myFirstBrowser"
# Third message...

There is no request body to submit with the HTTP request. If a message exists to be received, then the HTTP response contains the message. There is no request body to submit with the HTTP request. A null message is indicated by a response with no content and the header X-OC-NULL: true is returned.

Example Response Headers

These headers are standard with any non-null message received.

X-OC-PRIORITY: 4
X-OC-TIMESTAMP: 1458062945341
X-OC-DELIVERY-MODE: persistent
X-OC-EXPIRATION: 1459272545341
X-OC-MESSAGE-TYPE: HTTP
X-OC-DESTINATION: /queues/myFirstQueue
X-OC-REDELIVERED: false

Back to Top