S
S
sl1m_dogg2016-01-27 15:24:30
symfony
sl1m_dogg, 2016-01-27 15:24:30

How to speed up sending emails using rabbitmq (php)?

I am writing a test in symfony, I need to send 9600 letters in the shortest possible time. I thought about resolving this issue using rabbitmq, but I don’t understand the mechanism itself, how to make the rabbit itself send letters?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexey Pavlov, 2016-01-27
@lexxpavlov

in and of itself. rabbitmq, zeromq, gearman and the like do not perform tasks, you must make a handler yourself that will handle it. And such queues do a very simple thing - they allow the program to quickly transfer the task to the queue so that the handler (processors) can do business.

A
Alexey Romanenko, 2016-01-27
@slimus

rabbit as Aleksey Pavlov already said is just an implementation of the queue, and how the data will get there and read out you will need to implement yourself
Make queues on redis + https://github.com/michelsalib/BCCResqueBundle

V
veitmen, 2016-01-27
@veitmen

The problem is solved in very different ways. And first of all, you need to think about tricks. :)
First, one letter is sent to 9600 clients or 9600 different letters are sent? If there are 9600 clients, then you need to remember that one letter can contain many recipients. It is clear that there are limitations, but we must not forget about it.
In the second case, you need to think about multithreading. Again, all sorts of queues do not solve the problem in any way, it will simply be convenient for you to read messages from the queue. This is convenient in terms of stability as well. But it will be necessary to read in several streams.
You also need to remember that you can send several letters at a time by forming a Batch, if this is supported by the service for sending letters (if this is a service, of course).

O
Oleg Krasavin, 2016-01-28
@okwinza

Using a queue server for such a task is not the best solution. Rabbit is good when messages are received from many sources to a small number of consumers, in addition to a simple queue from one to another. Your problem is exactly the opposite.
Take a look at gearman.org

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question