I am very new to RabbitMQ.
I have set up a 'topic' exchange. The consumers may be started after the publisher. I'd like the consumers to be able to receive messages that have been sent before they were up, and that was not consumed yet.
The exchange is set up with the following parameters:
exchange_type => 'topic'
durable => 1
auto_delete => 0
passive => 0
The messages are published with this parameter:
delivery_mode => 2
Consumers use get() to retrieve the messages from the exchange.
Unfortunately, any message published before any client was up is lost. I have used different combinations.
I guess my problem is that the exchange does not hold messages. Maybe I need to have a queue between the publisher and the consumer. But this does not seem to work with a 'topic' exchange where messages are routed by a key.
How should I proceed? I use the Perl
binding Net::RabbitMQ
(shouldn't matter) and RabbitMQ 2.2.0
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…