topic_send may loss messages if the queue not exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.messaging |
In Progress
|
Medium
|
Gabriele Santomaggio |
Bug Description
If neutron agents get started before server, the agents' messages(sent to server) may be trashed by RabbitMQ.
Oslo.messaging only declare exchange but not queue when send a 'topic' message[1]. In RabbitMQ-server's tutorials, it said 'If we send a message to non-existing location, RabbitMQ will just trash the message'[2].
We've found that may make agents' messages get lost when server is not started. The worse thing is that agents will wait for reply of those messges until timeout, that means agents could not provide service until they get waiting timeout and resend messages to server. We expect agents to receive reply messages and ready to work as soon as the server getting started.
There may be three optional way to solve this:
1.Do not declare exchange when sending 'topic' messages, we will get exception if msg is sent to non-existing exchange.
2.Make sure the queue is exist before sending messages, and raise QueueNotFound exception if we found queue non-existing.
3.Declare the queue before sending messages, just like what notify_send do.
[1]https:/
[2]https:/
description: | updated |
Changed in oslo.messaging: | |
assignee: | nobody → Gabriele Santomaggio (gsantomaggio) |
Can neutron agent wait server to start up? Like "nova compute" call wait_until_ready until "conductor service" is started.
self.conductor_ api.wait_ until_ready( context. get_admin_ context( ))