EventGridReceiverClient class
Event Grid Namespaces Client
Constructors
Event |
Azure Messaging EventGrid Client |
Methods
acknowledge |
Acknowledge batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully acknowledged. The response body will include the set of successfully acknowledged lockTokens, along with other failed lockTokens with their corresponding error information. Successfully acknowledged events will no longer be available to any consumer. |
receive |
Receive Batch of Cloud Events from the Event Subscription. |
reject |
Reject batch of Cloud Events. |
release |
Release batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully released. The response body will include the set of successfully released lockTokens, along with other failed lockTokens with their corresponding error information. |
renew |
Renew lock for batch of Cloud Events. |
Constructor Details
EventGridReceiverClient(string, AzureKeyCredential | TokenCredential, string, string, EventGridReceiverClientOptions)
Azure Messaging EventGrid Client
new EventGridReceiverClient(endpoint: string, credential: AzureKeyCredential | TokenCredential, topicName: string, subscriptionName: string, options?: EventGridReceiverClientOptions)
Parameters
- endpoint
-
string
- credential
- topicName
-
string
- subscriptionName
-
string
- options
- EventGridReceiverClientOptions
Method Details
acknowledgeEvents(string[], AcknowledgeEventsOptions)
Acknowledge batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully acknowledged. The response body will include the set of successfully acknowledged lockTokens, along with other failed lockTokens with their corresponding error information. Successfully acknowledged events will no longer be available to any consumer.
function acknowledgeEvents(lockTokens: string[], options?: AcknowledgeEventsOptions): Promise<AcknowledgeResult>
Parameters
- lockTokens
-
string[]
Lock Tokens
- options
- AcknowledgeEventsOptions
Options to Acknowledge
Returns
Promise<AcknowledgeResult>
receiveEvents<T>(ReceiveEventsOptions)
Receive Batch of Cloud Events from the Event Subscription.
function receiveEvents<T>(options?: ReceiveEventsOptions): Promise<ReceiveResult<T>>
Parameters
- options
- ReceiveEventsOptions
Options to receive
Returns
Promise<ReceiveResult<T>>
rejectEvents(string[], RejectEventsOptions)
Reject batch of Cloud Events.
function rejectEvents(lockTokens: string[], options?: RejectEventsOptions): Promise<RejectResult>
Parameters
- lockTokens
-
string[]
Lock Tokens
- options
- RejectEventsOptions
Options to reject
Returns
Promise<RejectResult>
releaseEvents(string[], ReleaseEventsOptions)
Release batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is successfully released. The response body will include the set of successfully released lockTokens, along with other failed lockTokens with their corresponding error information.
function releaseEvents(lockTokens: string[], options?: ReleaseEventsOptions): Promise<ReleaseResult>
Parameters
- lockTokens
-
string[]
Lock Tokens
- options
- ReleaseEventsOptions
Options to release
Returns
Promise<ReleaseResult>
renewEventLocks(string[], RenewEventLocksOptions)
Renew lock for batch of Cloud Events.
function renewEventLocks(lockTokens: string[], options?: RenewEventLocksOptions): Promise<RenewLocksResult>
Parameters
- lockTokens
-
string[]
Lock Tokens
- options
- RenewEventLocksOptions
Options to renew
Returns
Promise<RenewLocksResult>