Scenario:
Webhooks to post events
Solution:
- Webhook
registration
- Client
would register for a predefined events with the callback url using the
unique keys using an API.
- Client updates or deletes the webhook setup.
- Webhook
events
- When a
application performs an operation then it would generate an event with
the predefined payload (json) or an API endpoint to pull the payload [encrypted
on server].
- Typically
you would use a messaging system which guarantees the sequence like Kafka,
using it to queue (publish) and (consume) to read the messages.
- The
message would then be sent to Webhook endpoint with payload for that
client (key) and it would then post it to client per their subscriptions
of events and setup per #1.
- The goal
would be to not miss any messages, so on failure we would keep retrying.
Pagination
Give
after every id, as traditional one is memory intensive:
- Next
-> / search after the above Id
- Prev-> / search backward, with id going back
No comments:
Post a Comment