2

I'm currently working on a php project where users can schedule specific email deliveries. They choose a future date and time and the message should be delivered on that specific date and time.

I'm familiar with rabbitmq, because I used it on other projects. Is there a way to use it for scheduling messages to specific dates? Even if they are far away in the future? I tried the delayed message plugin, but it didn't work out as expected and maybe the range of the delay attribute isn't enough because its unit is milliseconds.

Or should I use a cronjob for this task? Or maybe a different message queue which can be used with php and has this kind of feature?

Thanks

Tobias

Tobias
  • 578
  • 1
  • 5
  • 23

1 Answers1

3

This is something you can do with RabbitMQ + delaying strategy but I'd say it works well with small delays. with a big delay MQ is turning into a store as it has to keep them for long period of time.

For big delays you need a scheduler, like this one https://github.com/formapro/php-quartz

Maksim Kotlyar
  • 3,821
  • 27
  • 31
  • I already solved the problem by using a scheduler. It works pretty fine and big delays aren't really for message queues I must admit. Thanks for your answer, you are totally right. – Tobias Aug 07 '17 at 14:31