Consumes message from the queue.

GET https://cell-1.queue.messaging.{{region}}.oci.oraclecloud.com/20210201/queues/:queueId/messages

Consumes messages from the queue.

Request Params

KeyDatatypeRequiredDescription
visibilityInSecondsnumberIf the visibilityInSeconds parameter is set, messages will be hidden for visibilityInSeconds seconds and won't be consumable by other consumers during that time.
If it isn't set it defaults to the value set at the queue level.

Using a visibilityInSeconds value of 0 effectively acts as a peek functionality. Messages retrieved that way aren't meant to be deleted because they will most likely be delivered to another consumer as their visibility won't change, but will still increase the delivery count by one. | | timeoutInSeconds | number | | If the timeoutInSeconds parameter isn't set or it is set to a value greater than 0, the request is using the long-polling mode and will only return when a message is available for consumption (it does not wait for limit messages but still only returns at-most limit messages) or after timeoutInSeconds seconds (in which case it will return an empty response), whichever comes first.

If the parameter is set to 0, the request is using the short-polling mode and immediately returns whether messages have been retrieved or not. In same rare-cases a long-polling request could be interrupted (returned with empty response) before the end of the timeout. | | limit | number | | The limit parameter controls how many messages is returned at-most. |

HEADERS

KeyDatatypeRequiredDescription
opc-request-idstringUnique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Acceptstring

RESPONSES

status: OK

{"messages":[{"id":-12277386,"content":"cillum proident sit aliquip","receipt":"consequat do quis dolor","deliveryCount":-34139790,"visibleAfter":"1973-05-06T16:43:14.107Z","expireAfter":"2010-06-05T14:22:02.506Z"},{"id":-9064435,"content":"incididunt qui","receipt":"consequat sed veniam irure est","deliveryCount":-25187129,"visibleAfter":"2022-10-05T23:01:34.250Z","expireAfter":"2005-12-23T21:40:33.919Z"}]}