Class QueueClient
Service client instance for Queue.
Implements
Inherited Members
Namespace: Oci.QueueService
Assembly: OCI.DotNetSDK.Queue.dll
Syntax
public class QueueClient : RegionalClientBase, IDisposable
Constructors
QueueClient(IBasicAuthenticationDetailsProvider, ClientConfiguration, string)
Creates a new service instance using the given authentication provider and/or client configuration and/or endpoint. A client configuration can also be provided optionally to adjust REST client behaviors.
Declaration
public QueueClient(IBasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration clientConfiguration = null, string endpoint = null)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authenticationDetailsProvider | The authentication details provider. Required. |
ClientConfiguration | clientConfiguration | The client configuration that contains settings to adjust REST client behaviors. Optional. |
string | endpoint | The endpoint of the service. If not provided and the client is a regional client, the endpoint will be constructed based on region information. Optional. |
Methods
DeleteMessage(DeleteMessageRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Deletes the message represented by the receipt from the queue.
You must use the messages endpoint to delete messages.
The messages endpoint may be different for different queues. Use {@link #getQueue(GetQueueRequest) getQueue} to find the queue's messagesEndpoint
.
Declaration
public Task<DeleteMessageResponse> DeleteMessage(DeleteMessageRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
DeleteMessageRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<DeleteMessageResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use DeleteMessage API.
DeleteMessages(DeleteMessagesRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Deletes multiple messages from the queue or the consumer group. Only messages from the same queue/consumer group can be deleted at once.
You must use the messages endpoint to delete messages.
The messages endpoint may be different for different queues. Use {@link #getQueue(GetQueueRequest) getQueue} to find the queue's messagesEndpoint
.
Declaration
public Task<DeleteMessagesResponse> DeleteMessages(DeleteMessagesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
DeleteMessagesRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<DeleteMessagesResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use DeleteMessages API.
GetMessages(GetMessagesRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Consumes messages from the queue.
You must use the messages endpoint to consume messages.
The messages endpoint may be different for different queues. Use {@link #getQueue(GetQueueRequest) getQueue} to find the queue's messagesEndpoint
.
GetMessages accepts optional channelFilter query parameter that can filter source channels of the messages.
When channelFilter is present, service will return available messages from the channel which ID exactly matched the filter.
When filter is not specified, messages will be returned from a random non-empty channel within a queue.
Declaration
public Task<GetMessagesResponse> GetMessages(GetMessagesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetMessagesRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetMessagesResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetMessages API.
GetStats(GetStatsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets the statistics for the queue and its dead letter queue.
You must use the messages endpoint to get a queue's statistics.
The messages endpoint may be different for different queues. Use {@link #getQueue(GetQueueRequest) getQueue} to find the queue's messagesEndpoint
.
Declaration
public Task<GetStatsResponse> GetStats(GetStatsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
GetStatsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<GetStatsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use GetStats API.
ListChannels(ListChannelsRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Gets the list of IDs of non-empty channels. It will return an approximate list of IDs of non-empty channels. That information is based on the queue level statistics. API supports optional channelFilter parameter which will filter the returned results according to the specified filter. List of channel IDs is approximate, because statistics is refreshed once per-second, and that list represents a snapshot of the past information. API is paginated.
Declaration
public Task<ListChannelsResponse> ListChannels(ListChannelsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
ListChannelsRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<ListChannelsResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use ListChannels API.
PutMessages(PutMessagesRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Puts messages into the queue.
You must use the messages endpoint to produce messages.
The messages endpoint may be different for different queues. Use {@link #getQueue(GetQueueRequest) getQueue} to find the queue's messagesEndpoint
.
Declaration
public Task<PutMessagesResponse> PutMessages(PutMessagesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
PutMessagesRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<PutMessagesResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use PutMessages API.
UpdateMessage(UpdateMessageRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Updates the visibility of the message represented by the receipt.
You must use the messages endpoint to update messages.
The messages endpoint may be different for different queues. Use {@link #getQueue(GetQueueRequest) getQueue} to find the queue's messagesEndpoint
.
Declaration
public Task<UpdateMessageResponse> UpdateMessage(UpdateMessageRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateMessageRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateMessageResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateMessage API.
UpdateMessages(UpdateMessagesRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Updates multiple messages in the queue or the consumer group. Only messages from the same queue/consumer group can be updated at once.
You must use the messages endpoint to update messages.
The messages endpoint may be different for different queues. Use {@link #getQueue(GetQueueRequest) getQueue} to find the queue's messagesEndpoint
.
Declaration
public Task<UpdateMessagesResponse> UpdateMessages(UpdateMessagesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
UpdateMessagesRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<UpdateMessagesResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use UpdateMessages API.