An event handler is any system that exposes an endpoint and is the destination for events sent by Event Grid. An event handler receiving an event acts upon it and uses the event payload to execute some logic, which might lead to the occurrence of new events.
The way to configure Event Grid to send events to a destination is through the creation of an event subscription. It can be done through Azure CLI, management SDK, or using direct HTTPS calls using the 2020-10-15-preview API version.
In general, Event Grid on Kubernetes can send events to any destination via Webhooks. Webhooks are HTTP(s) endpoints exposed by a service or workload to which Event Grid has access. The webhook can be a workload hosted in the same cluster, in the same network space, on the cloud, on-premises or anywhere that Event Grid can reach.
Important
Event Grid on Kubernetes with Azure Arc is currently in public preview. This preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Through Webhooks, Event Grid supports the following destinations hosted on a Kubernetes cluster:
In addition to Webhooks, Event Grid on Kubernetes can send events to the following destinations hosted on Azure:
Event Grid on Kubernetes offers a good level of feature parity with Azure Event Grid's support for event subscriptions. The following list enumerates the main differences in event subscription functionality. Apart from those differences, you can use Azure Event Grid's REST api version 2020-10-15-preview as a reference when managing event subscriptions on Event Grid on Kubernetes.
properties.deadLetterDestination
in your event subscription payload.The other important aspect of configuring an event subscription is selecting the events that are meant to be delivered to a destination. For more information, see Event Filtering.
Sample destination configurationsFollowing are some basic sample configurations depending on the intended destination.
WebHookTo publish to a WebHook endpoint, set the endpointType
to WebHook
and provide:
endpointUrl: The WebHook endpoint URL
{
"properties": {
"destination": {
"endpointType": "WebHook",
"properties": {
"endpointUrl": "<your-webhook-endpoint>"
}
}
}
}
To publish to an Azure Event Grid cloud endpoint, set the endpointType
to WebHook
and provide:
endpointUrl: Azure Event Grid topic URL in the cloud with the API version parameter set to 2018-01-01 and aeg-sas-key
set to the URL encoded SAS key.
{
"properties": {
"destination": {
"endpointType": "WebHook",
"properties": {
"endpointUrl": "<your-event-grid-cloud-topic-endpoint-url>?api-version=2018-01-01&aeg-sas-key=urlencoded(sas-key-value)"
}
}
}
}
To publish to an Event Hubs, set the endpointType
to eventHub
and provide:
resourceId: resource ID for the specific event hub.
{
"properties": {
"destination": {
"endpointType": "eventHub",
"properties": {
"resourceId": "<Azure Resource ID of your event hub>"
}
}
}
}
To publish to a Service Bus queue, set the endpointType
to serviceBusQueue
and provide:
resourceId: resource ID for the specific Service Bus queue.
{
"properties": {
"destination": {
"endpointType": "serviceBusQueue",
"properties": {
"resourceId": "<Azure Resource ID of your Service Bus queue>"
}
}
}
}
To publish to a Service Bus topic, set the endpointType
to serviceBusTopic
and provide:
resourceId: resource ID for the specific Service Bus topic.
{
"properties": {
"destination": {
"endpointType": "serviceBusTopic",
"properties": {
"resourceId": "<Azure Resource ID of your Service Bus topic>"
}
}
}
}
To publish to a Storage Queue, set the endpointType
to storageQueue
and provide:
queueName: Name of the Azure Storage queue you're publishing to.
resourceID: Azure resource ID of the storage account that contains the queue.
{
"properties": {
"destination": {
"endpointType": "storageQueue",
"properties": {
"queueName": "<your-storage-queue-name>",
"resourceId": "<Azure Resource ID of your Storage account>"
}
}
}
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4