We have a project which provides API for a number of clients who are approved by us (we sign paper contracts with them). Our clients want to get updates from us about their resources (all clients are independent). Currently, we consider WebHooks and RabbitMQ to stream events. RabbitMQ sounds exotic since it will be used by external clients (yeah, we approve them, but we don't control them). If we go with WebHooks, we need to re-implement lots of features which we get for free from RabbitMQ.
Features we need to implement in case of WebHooks:
Have you heard about any experience of using RabbitMQ in place of WebHooks? Does it sound too crazy?
If you want to send events through direclty RabbitMQ, you will face the following challenges:
You have to send the same event to different queues in order for your clients only to receive their own events. E.x.: client1.invoice.paid, client2.invoice.paid
You have to create an account in RabbitMq for each client, it will create the challenges of user management.
Security. Your Rabbitmq service port is going to be open to the public.
In order to avoid those challenges, you should implement a webhook dispatch service with RabbitMq. How does it work?
Check this URL to get an idea of how to design webhook service: https://www.slideshare.net/jbliao/how-to-design-reliable-and-scalable-webhooks-with-rabbitmq
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With