Answer the question
In order to leave comments, you need to log in
RabbitMQ (MQTT) how to send response message from consumer to publisher?
I'm trying to find information on how to send a response to a publisher. I want to use the MQTT protocol. Is there any way to do this? I need the publisher to send a RabbitMQ message, the consumer receives it, processes it and sends the result of the work back to the publisher`y.
In the AMQP protocol, this is implemented using a remote procedure call (RPC)
Example for AMQP:
result = channel.queue_declare(queue='', exclusive=True)
callback_queue = result.method.queue
channel.basic_publish(exchange='',
routing_key='rpc_queue',
properties=pika.BasicProperties(
reply_to = callback_queue,
),
body=request)
Answer the question
In order to leave comments, you need to log in
strange approach. you want to make the buffer link responsible for guaranteed delivery. Maybe look towards kafka, then with this approach?
The essence of the rabbit, from point A the message was thrown into the rabbit, from point B they connected to the rabbit and took the message from the rabbit. The rabbit here simply performs the function of a shelf (they put / took the book away)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question