oslo.messaging/oslo_messaging/_drivers
Mehdi Abaakouk 64bdd80c5f rabbit: heartbeat implementation
AMQP offers a heartbeat feature to ensure that the application layer
promptly finds out about disrupted connections (and also completely
unresponsive peers). If the client requests heartbeats on connection, rabbit
server will regularly send messages to each connections with the expectation of
a response.

To acheive this, each driver connection object spawn a thread that
send/retrieve heartbeat packets exchanged between the server and the
client.

To protect the concurrency access to the kombu connection between the
driver and this thread use a lock that always prioritize the
heartbeat thread. So when the heartbeat thread wakes up it will acquire the
lock quickly, to ensure we have no heartbeat starvation when the driver
sends a lot of messages.

Also when we are polling the broker, the lock can be held for a long
time by the 'consume' method, so this one does the heartbeat stuffs itself.

DocImpact: 2 new configuration options for Rabbit driver

Co-Authored-By: Oleksii Zamiatin <ozamiatin@mirantis.com>
Co-Authored-By: Ilya Pekelny <ipekelny@mirantis.com>

Related-Bug: #1371723
Closes-Bug: #856764

Change-Id: I1d3a635f3853bc13ffc14034468f1ac6262c11a3
(cherry picked from commit b9e134d7e9)
2015-03-24 17:34:55 +01:00
..
protocols Update Oslo imports to remove namespace package 2015-01-21 21:09:33 -05:00
__init__.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
amqp.py rabbit: heartbeat implementation 2015-03-24 17:34:55 +01:00
amqpdriver.py rabbit: heartbeat implementation 2015-03-24 17:34:55 +01:00
base.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
common.py Declare DirectPublisher exchanges with passive=True 2015-01-27 11:07:51 +01:00
impl_fake.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
impl_qpid.py rabbit: heartbeat implementation 2015-03-24 17:34:55 +01:00
impl_rabbit.py rabbit: heartbeat implementation 2015-03-24 17:34:55 +01:00
impl_zmq.py Fix notifications broken with ZMQ driver 2015-02-02 12:04:24 +08:00
matchmaker.py Update Oslo imports to remove namespace package 2015-01-21 21:09:33 -05:00
matchmaker_redis.py Fix matchmaker_redis ack_alive fails with KeyError 2015-02-27 16:32:10 +08:00
matchmaker_ring.py Update Oslo imports to remove namespace package 2015-01-21 21:09:33 -05:00
pool.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00