On Tue, Dec 20, 2011 at 6:05 AM, Pranav Prakash <pra...@gmail.com> wrote:
> Hi Folks,
>
> I am planning to use RabbitMQ for our an upcoming project, in email queue
> purposes.
Excellent.
> So, we have three main types (priorities) of emails that we want
> to send out -
>
> High Priority - Must be send ASAP
> Medium Priority - Must be send within 12/24 hr window
> Low Priority - Time of delivery does not matters
>
> There are couple of producer processes, which generate message body (to,
> subject, email message, priority) and then a couple of consumer processes
> using an API call to send emails.
>
> What would be a good approach to fit the priority into this otherwise ideal
> world scenario?
Have a look at this tutorial:
http://www.rabbitmq.com/tutorials/tutorial-four-python.html
http://www.rabbitmq.com/tutorials/tutorial-four-java.html
You could achieve your goal by using a direct exchange and three
queues bound to that exchange with, respectively, the binding keys:
"high", "medium", and "low". The producer should attach one of these
three keys to each message, when it publishes that message. The
consumers should connect to the queues in what I hope is the obvious
way, such that they can relay messages to the email service(s).
Cheers
alexis
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq...@lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>