pmorelli92 / bunnify

AMQP library to publish and consume events
MIT License
56 stars 3 forks source link

Add delay to message #45

Closed tomaswarynyca closed 1 week ago

tomaswarynyca commented 5 months ago

Any idea how to delay messages to be proccesed?

Adding this plugin would be the only option? https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq

pmorelli92 commented 5 months ago

Adding this plugin would be the only option?

In what RabbitMQ is aware, I think it is. In some previous workplace what I've done to solve this was to store the messages in a database table and loop through them, only firing them at the correct time.

But if you want to go with the plugin approach, we can probably extend how the Publish looks like in order to accept an option such as WithHeader(key, val) to add custom headers to the publish function.