What is a Sender of Webhooks?
Considering the overall network of communications, where Webhooks are messages exchanged between two applications, a Webhook Sender is an application that sends these messages to another application (or to a multitude of applications).
In real life, you might consider the Sender as the postman delivering a letter or a package to the destination, ensuring the address is correct and exists, that the postbox can hold the shipment, eventually coming back more than once at the address (if the recipient is not at home), accepting the signature, etc.
As much as a postman wouldn't care if the letter or package was in delivery because of an agreement between the recipient and an organization, the same way a Webhook Sender doesn't have to necessarily require the knowledge that an application is expecting the message it is sending (this would be a Webhook Subscription).
The Delivery Destination
A Sender requires the specification of a Destination, to be able to attempt the delivery of Webhooks, which is like a postal address, following the example above.
In most cases, this is simply a URL (Universal Resource Locator), that can be reached by an HTTP request, but in some scenarios, this can be enriched with further information instructing the sender on the behavior to have with it, when attempting to deliver a package (for example, we inform the sender to leave the package to our neighbor, if we are not at home, or to try reaching us only on Thursdays, etc.).
Such destination-specific instructions would act as an exception to the regular behavior of the sender, which is described below.
The Sender Behavior
When sending a Webhook to another party, the application sending messages should ensure that the destination is reachable, the message is well-formatted, its delivery is retried (in case of failures), and the integrity of the content is assured.
This is done by a configured behavior, that typically provides the following elements of configuration
Content Type
The specification of the format of the contents of the Webhook message (eg. JSON, XML, Form-Encoded)
Retry Strategy
The methodology to deliver the message (eg. Circuit Breaker, Exponential Backoff, Timeout, etc.), and the configurations of retries (eg. a maximum number of retries, delays between attempts, etc.)
Signature Method
A methodology used to sign the Webhook payloads, so that the the receiver can ensure their integrity
Context
The set of contextual information informing the receiver of the origination of the Webhook (eg. the machine name, the application type, etc.)
Last updated