-
-
Notifications
You must be signed in to change notification settings - Fork 41
HTTP Subscribers
HTTP subscribers deliver events to webhook endpoints via HTTP POST requests.
| Setting | Description |
|---|---|
name |
The name of the subscriber. It can only contain letters, numbers, and dashes. |
endpoint |
The subscription endpoint URL. Events received by topic will be sent to this address. |
disabled |
(Optional) Set to true to disable this subscriber. Events will not be delivered to disabled subscribers. |
disableValidation |
Set to true to disable subscription validation. Default is false, which means subscription validation will be attempted each time the simulator starts. |
deliverySchema |
(Optional) Override the delivery schema for this specific subscriber. Values: EventGridSchema or CloudEventV1_0. Takes precedence over the topic's outputSchema. |
filter |
(Optional) Event filtering configuration. See Filtering. |
retryPolicy |
(Optional) Retry policy settings. See Retry and Dead-Letter. |
deadLetter |
(Optional) Dead-letter settings. See Retry and Dead-Letter. |
{
"subscribers": {
"http": [
{
"name": "MyWebhook",
"endpoint": "https://myapp.com/webhooks/events",
"disableValidation": true
}
]
}
}When a subscription is added to Azure Event Grid, it first sends a validation event to the subscription endpoint. The validation event contains a validationCode which the subscription endpoint must echo back. If this does not occur, Azure Event Grid will not enable the subscription.
More information about subscription validation can be found at Azure Event Grid webhook event delivery.
The simulator mimics this validation behavior at startup, but it can be disabled using the disableValidation setting.
Note: Validation requests timeout after 5 minutes. If the endpoint doesn't respond within this time, validation fails and the subscriber is not enabled.
{
"topics": [
{
"name": "OrdersTopic",
"port": 60101,
"key": "TheLocal+DevelopmentKey=",
"subscribers": {
"http": [
{
"name": "OrdersWebhook",
"endpoint": "https://myapp.com/webhooks/orders",
"disableValidation": true,
"filter": {
"includedEventTypes": ["Order.Created", "Order.Updated"]
},
"retryPolicy": {
"enabled": true,
"maxDeliveryAttempts": 10,
"eventTimeToLiveInMinutes": 60
},
"deadLetter": {
"enabled": true,
"folderPath": "./dead-letters"
}
}
]
}
}
]
}For backwards compatibility, HTTP subscribers can also be configured as a flat array:
{
"subscribers": [
{
"name": "MyWebhook",
"endpoint": "https://myapp.com/webhooks/events",
"disableValidation": true
}
]
}- Configuration - Complete configuration reference
- Filtering - Event filtering options
- Retry and Dead-Letter - Retry policies and dead-lettering
- Schema Support - Delivery schema options
Getting Started
Subscribers
Features
Deployment
Reference