Class EventGridReceiverAsyncClient
java.lang.Object
com.azure.messaging.eventgrid.namespaces.EventGridReceiverAsyncClient
Initializes a new instance of the asynchronous EventGridReceiverClient type.
-
Method Summary
Modifier and TypeMethodDescriptionacknowledge(List<String> lockTokens) Acknowledge a batch of Cloud Events.Mono<com.azure.core.http.rest.Response<AcknowledgeResult>> acknowledgeWithResponse(List<String> lockTokens, com.azure.core.http.rest.RequestOptions requestOptions) Acknowledge a batch of Cloud Events.Gets the subscriptionName for this client.Gets the topicName for this client.receive()Receive a Cloud Event from a subscription.Receive a batch of Cloud Events from a subscription.Mono<com.azure.core.http.rest.Response<ReceiveResult>> receiveWithResponse(Integer maxEvents, Duration maxWaitTime, com.azure.core.http.rest.RequestOptions requestOptions) Receive a batch of Cloud Events from a subscription.Reject a batch of Cloud Events.Mono<com.azure.core.http.rest.Response<RejectResult>> rejectWithResponse(List<String> lockTokens, com.azure.core.http.rest.RequestOptions requestOptions) Reject a batch of Cloud Events.Release a batch of Cloud Events.release(List<String> lockTokens, ReleaseDelay releaseDelay) Release a batch of Cloud Events.Mono<com.azure.core.http.rest.Response<ReleaseResult>> releaseWithResponse(List<String> lockTokens, ReleaseDelay releaseDelay, com.azure.core.http.rest.RequestOptions requestOptions) Release a batch of Cloud Events.renewLocks(List<String> lockTokens) Renew locks for a batch of Cloud Events.Mono<com.azure.core.http.rest.Response<RenewLocksResult>> renewLocksWithResponse(List<String> lockTokens, com.azure.core.http.rest.RequestOptions requestOptions) Renew locks for a batch of Cloud Events.
-
Method Details
-
receive
Receive a batch of Cloud Events from a subscription.- Parameters:
maxEvents- Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1.maxWaitTime- Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds. Fractional seconds are ignored and rounded down.- Returns:
- details of the Receive operation response on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
receiveWithResponse
public Mono<com.azure.core.http.rest.Response<ReceiveResult>> receiveWithResponse(Integer maxEvents, Duration maxWaitTime, com.azure.core.http.rest.RequestOptions requestOptions) Receive a batch of Cloud Events from a subscription.- Parameters:
maxEvents- Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1.maxWaitTime- Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds. Fractional seconds are ignored and rounded down.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- details of the Receive operation response on successful completion of
Monoalong withResponse. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
receive
Receive a Cloud Event from a subscription. This method will wait 60 seconds for a response.- Returns:
- details of the Receive operation response on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
acknowledge
Acknowledge a batch of Cloud Events. The response will include the set of successfully acknowledged lock tokens, along with other failed lock tokens with their corresponding error information. Successfully acknowledged events will no longer be available to be received by any consumer.- Parameters:
lockTokens- Array of lock tokens.- Returns:
- the result of the Acknowledge operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
acknowledgeWithResponse
public Mono<com.azure.core.http.rest.Response<AcknowledgeResult>> acknowledgeWithResponse(List<String> lockTokens, com.azure.core.http.rest.RequestOptions requestOptions) Acknowledge a batch of Cloud Events. The response will include the set of successfully acknowledged lock tokens, along with other failed lock tokens with their corresponding error information. Successfully acknowledged events will no longer be available to be received by any consumer.- Parameters:
lockTokens- Array of lock tokens.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the result of the Acknowledge operation on successful completion of
Monoalong withResponse. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
release
Release a batch of Cloud Events. The response will include the set of successfully released lock tokens, along with other failed lock tokens with their corresponding error information. Successfully released events can be received by consumers.- Parameters:
lockTokens- Array of lock tokens.releaseDelay- Release cloud events with the specified delay in seconds.- Returns:
- the result of the Release operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
releaseWithResponse
public Mono<com.azure.core.http.rest.Response<ReleaseResult>> releaseWithResponse(List<String> lockTokens, ReleaseDelay releaseDelay, com.azure.core.http.rest.RequestOptions requestOptions) Release a batch of Cloud Events. The response will include the set of successfully released lock tokens, along with other failed lock tokens with their corresponding error information. Successfully released events can be received by consumers.- Parameters:
lockTokens- Array of lock tokens.releaseDelay- Release cloud events with the specified delay in seconds.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the result of the Release operation on successful completion of
Monoalong withResponse. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
release
Release a batch of Cloud Events. The response will include the set of successfully released lock tokens, along with other failed lock tokens with their corresponding error information. Successfully released events can be received by consumers.- Parameters:
lockTokens- Array of lock tokens.- Returns:
- the result of the Release operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
reject
Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer.- Parameters:
lockTokens- Array of lock tokens.- Returns:
- the result of the Reject operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
rejectWithResponse
public Mono<com.azure.core.http.rest.Response<RejectResult>> rejectWithResponse(List<String> lockTokens, com.azure.core.http.rest.RequestOptions requestOptions) Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer.- Parameters:
lockTokens- Array of lock tokens.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the result of the Reject operation on successful completion of
Monoalong withResponse. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
renewLocks
Renew locks for a batch of Cloud Events. The response will include the set of successfully renewed lock tokens, along with other failed lock tokens with their corresponding error information. Successfully renewed locks will ensure that the associated event is only available to the consumer that holds the renewed lock.- Parameters:
lockTokens- Array of lock tokens.- Returns:
- the result of the RenewLock operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
renewLocksWithResponse
public Mono<com.azure.core.http.rest.Response<RenewLocksResult>> renewLocksWithResponse(List<String> lockTokens, com.azure.core.http.rest.RequestOptions requestOptions) Renew locks for a batch of Cloud Events. The response will include the set of successfully renewed lock tokens, along with other failed lock tokens with their corresponding error information. Successfully renewed locks will ensure that the associated event is only available to the consumer that holds the renewed lock.- Parameters:
lockTokens- Array of lock tokens.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the result of the RenewLock operation on successful completion of
Monoalong withResponse. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getTopicName
Gets the topicName for this client.- Returns:
- the topic name.
-
getSubscriptionName
Gets the subscriptionName for this client.- Returns:
- the subscription name.
-