webhook url for queues

275 views
Skip to first unread message

Marco Reinbold

unread,
Aug 18, 2016, 9:06:41 AM8/18/16
to rabbitmq-users
hey there,
yesterday I started working with rabbitMQ. Posting and fetching messages works fine, using the PHP libs or even using the API.
Now I have a service which provides webhooks, that are nothing else than a POST request to the given address with the payload as json in the body. You can see the docs here https://developer.billwerk.io/Docs/Webhooks
I used iron.io for a while and they provided a "public" webhook url for each queue, which had the auth-token as url param. So i could just add the webhook url of a queue to the webhook definition.
Is there a possibility to use rabbitMQ the same way? I tried to use the rabbitMQ API for the exchanges, but I don't see a possibility to put the basic auth credentials into the url.


thanks,
Marco

Michael Klishin

unread,
Aug 18, 2016, 9:14:49 AM8/18/16
to rabbitm...@googlegroups.com, Marco Reinbold
With RabbitMQ you need to run a small consumer that consumes messages and publishes
them to the web hook endpoint.

Note that if you need the same message to be processed elsewhere, "duplication" happens
at the routing stage: http://www.rabbitmq.com/tutorials/amqp-concepts.html.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Marco Reinbold

unread,
Aug 18, 2016, 9:29:19 AM8/18/16
to rabbitmq-users, ma...@marco-reinbold.de
hey Michael,
thanks for the quick response, but I'm not sure, if we understood each other right.
I have a service which sends POST requests after certain events to a url I can define. I want rabbitMQ to receive and put them in a queue.
You wrote about a consumer, but this is the step after, isn't it?

thanks,
Marco

Michael Klishin

unread,
Aug 18, 2016, 9:47:10 AM8/18/16
to rabbitm...@googlegroups.com, Marco Reinbold
Understood. You can publish to RabbitMQ via an HTTP API [1] and using
the default exchange that might even be sufficient. However, you'd need to hardcode
HTTP API credentials into the URI. So maybe developing a small HTTP API server is still worth it.

This is an interesting idea for a plugin :)

1. https://cdn.rawgit.com/rabbitmq/rabbitmq-management/rabbitmq_v3_6_5/priv/www/api/index.html
Reply all
Reply to author
Forward
0 new messages