M
M
Megadeth772020-01-20 23:10:21
Message Queues
Megadeth77, 2020-01-20 23:10:21

What architecture is needed to build a simple named message queue for machine-to-machine communication?

I will reformulate the question How to organize an exchange of messages between processes by the principle of mailbox?
I need to organize interaction between the server and several workers. To do this, I want to have a named message queue that will live independently of the processes consuming it. Those. first, the worker may wake up, spit something into the server queue. Then the server wakes up, reads something from its queue and spits something into the worker. He may be dead at this time, got up - answered. Etc.
The performance of the queue itself does not matter. It is necessary to organize as simply as possible with a minimum of dependencies.
All this is done at the expense of times through the SQL database - we write a message to the table, from whom, to whom, in the consumer we poll the database, getting the desired message. But it seems like it’s completely ugly and loads the database with empty requests. I want messages to be pushed to the consumer.
What options.
RabbitMQ - does not seem to be able to queue to which consumers are not connected.
Redis - does not guarantee the delivery of messages (?)
Kafka - seems to be able, but heavy and slow at the start and generally overkill explicit, I have 1 message in half an hour, why for such kafka?
ZeroMQ - no dedicated broker and somewhat low-level
As a result, of course, I will do it through the base, but I will suffer in search of a more elegant solution. Please help the audience!
A big request is not just to advise what to use from brokers, but at least briefly describe the architecture of objects inside it (queue exchange topic consumer, etc.)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-01-20
@Megadeth77

RabbitMQ can do everything perfectly, someone can't read the
Kafka documentation - the fastest solution, but it's not Brake - it's History (commit) Log and Streaming. But to administer it, of course, is a pain.
ZeroMQ - there is a broker, but everything is stored In Memory
RabbitMQ has excellent manuals with typical architectures

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question