Answer the question
In order to leave comments, you need to log in
How to organize the message queue so that each trace. the message was transmitted only after the previous one was processed?
There are several messages in the queue, in the "Sender.php" script. And there is a receiver script, respectively, "Receiver.php".
The task is that after sending a message from sender-a, the receiver sends a flag about the completion / incompleteness of processing the received message, and only if the flag has the "completed" status, then the next message from the queue is sent.
I have not worked with RabbitMQ yet, I just look in its direction and have not yet understood whether it is possible to implement such functionality using it in principle. If there are knowledgeable people, then I ask for tips on this issue. If with a brief code example, then it would be great in general.
Answer the question
In order to leave comments, you need to log in
It's not entirely clear from the text, do you want to have a queue or sender should be executed every time for a new message? If there is a queue, then it is possible to process messages one at a time, but only if there is one recipient. In the AMQP protocol, you can manually receive messages one by one - basic_get, or set the number of unacknowledged messages to 1 and acknowledge the processing of each.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question