Package com.oracle.cloud.spring.queue
Interface Queue
- All Known Implementing Classes:
QueueImpl
public interface Queue
Interface for defining OCI Queue module.
-
Method Summary
Modifier and TypeMethodDescriptioncreateQueue
(String queueName, String compartmentId, Integer deadLetterQueueDeliveryCount, Integer retentionInSeconds) Creates a queue in a compartment.com.oracle.bmc.queue.responses.DeleteMessageResponse
deleteMessage
(String queueId, String messageReceipt) Delete the message by the receipt from a queuecom.oracle.bmc.queue.responses.DeleteQueueResponse
deleteQueue
(String queueId) Delete the queue by id.com.oracle.bmc.queue.responses.GetMessagesResponse
getMessages
(String queueId, Integer visibilityInSeconds, Integer timeoutInSeconds, Integer limit) Get/consume messages from a queue.com.oracle.bmc.queue.responses.GetQueueResponse
Get the queue resource.com.oracle.bmc.queue.QueueAdminClient
Direct instance of OCI Java SDK QueueAdminClient.com.oracle.bmc.queue.QueueClient
Direct instance of OCI Java SDK QueueClient.com.oracle.bmc.queue.responses.ListQueuesResponse
listQueues
(String queueName, String compartmentId) List the queues by name and/or in a compartment.com.oracle.bmc.queue.responses.PutMessagesResponse
putMessages
(String queueId, String[] messages) Put messages into a queue.com.oracle.bmc.queue.responses.UpdateMessagesResponse
updateMessages
(String queueId, String[] messageReceipts, Integer visibilityInSeconds) Update the messages by their receipt in a queue.
-
Method Details
-
getQueueAdminClient
com.oracle.bmc.queue.QueueAdminClient getQueueAdminClient()Direct instance of OCI Java SDK QueueAdminClient.- Returns:
- QueueAdminClient
-
getQueueClient
com.oracle.bmc.queue.QueueClient getQueueClient()Direct instance of OCI Java SDK QueueClient.- Returns:
- QueueClient
-
putMessages
Put messages into a queue.- Parameters:
queueId
- OCID of the queuemessages
- list of messages- Returns:
- PutMessagesResponse
-
getMessages
com.oracle.bmc.queue.responses.GetMessagesResponse getMessages(String queueId, Integer visibilityInSeconds, Integer timeoutInSeconds, Integer limit) Get/consume messages from a queue.- Parameters:
queueId
- OCID of the queuevisibilityInSeconds
- Messages will be hidden and won't be consumable by other consumers for this timetimeoutInSeconds
- Timeout for the requestlimit
- The maximum number of messages returned- Returns:
- GetMessagesResponse
-
updateMessages
com.oracle.bmc.queue.responses.UpdateMessagesResponse updateMessages(String queueId, String[] messageReceipts, Integer visibilityInSeconds) Update the messages by their receipt in a queue.- Parameters:
queueId
- OCID of the queuemessageReceipts
- List of message receipts to be updatedvisibilityInSeconds
- Messages will be hidden and won't be consumable by other consumers for this time- Returns:
- UpdateMessagesResponse
-
deleteMessage
com.oracle.bmc.queue.responses.DeleteMessageResponse deleteMessage(String queueId, String messageReceipt) Delete the message by the receipt from a queue- Parameters:
queueId
- OCID of the queuemessageReceipt
- The receipt of the message to be deleted- Returns:
- DeleteMessageResponse
-
createQueue
String createQueue(String queueName, String compartmentId, Integer deadLetterQueueDeliveryCount, Integer retentionInSeconds) Creates a queue in a compartment.- Parameters:
queueName
- Name of the queue to be createdcompartmentId
- Compartment OCID where the Queue needs to be createddeadLetterQueueDeliveryCount
- The number of times a message is delivered before its moved to the dead letter queueretentionInSeconds
- The time a message remains in the queue before its deleted by the service if it is not deleted by a consumer- Returns:
- String OCID of the queue
-
getQueue
Get the queue resource.- Parameters:
queueId
- OCID of the queue- Returns:
- GetQueueResponse
-
listQueues
com.oracle.bmc.queue.responses.ListQueuesResponse listQueues(String queueName, String compartmentId) List the queues by name and/or in a compartment.- Parameters:
queueName
- Name of the queue to list themcompartmentId
- Compartment OCID where to list the Queues- Returns:
- ListQueuesResponse
-
deleteQueue
Delete the queue by id.- Parameters:
queueId
- OCID of the queue- Returns:
- DeleteQueueResponse
-