Hi, I'm trying to implement the following scenario with RabbitMQ:<br><br>- a site which generates various emails according to user actions (like registration, ordering etc.), or according to schedule (daily announcements); emails are published into an RabbitMQ exchange<br>
- a set of workers which read the queue and send out emails, do some logging<br>- some emails need to be sent immediately<br>- some should be sent precisely at specific time (or as close as possible), like daily announcement should go out exactly at 8:00AM<br>
- generating daily announcements involves complex logic and takes some time (more than actual delivery), so there is a job which prepares it before time X and publishes into an exchange<br><br>So, my question is if there is a native way to schedule messages to be delivered to workers exactly at specific time? If there is not, which strategy do you think would be the best:<br>
- declaring a separate queue for such scheduled/postponed messages and starting workers at required time (by cron)<br>- having a check-what-time-is-it/sleep cycle in the workers (which are always running)<br>- having workers consume the message, check time and do NOT send acknowledgement if it's not yet the time to process it (this is the only strategy I see, NOT requiring separate workers, but it will use a lot of resources for retrying message delivery)<br>
- anything else?<br><br>Thanks in advance,<br><br>Konstantin.<br>