oslo.messaging/oslo_messaging
Mehdi Abaakouk b9e134d7e9 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
2015-03-18 15:15:33 +01:00
..
_cmd Update Oslo imports to remove namespace package 2015-01-21 21:09:33 -05:00
_drivers rabbit: heartbeat implementation 2015-03-18 15:15:33 +01:00
_executors Add a new aioeventlet executor 2015-02-05 12:11:37 +01:00
notify Deprecates the localcontext API 2015-03-11 16:14:50 +01:00
openstack Deprecates the localcontext API 2015-03-11 16:14:50 +01:00
rpc Merge "Add support for multiple namespaces in Targets" 2015-03-13 11:38:25 +00:00
tests rabbit: heartbeat implementation 2015-03-18 15:15:33 +01:00
__init__.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
_i18n.py Update Oslo imports to remove namespace package 2015-01-21 21:09:33 -05:00
_utils.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
conffixture.py Move each drivers options into its own group 2015-02-02 10:58:54 +01:00
exceptions.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
localcontext.py Deprecates the localcontext API 2015-03-11 16:14:50 +01:00
opts.py Move each drivers options into its own group 2015-02-02 10:58:54 +01:00
serializer.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
server.py Move files out of the namespace package 2015-01-12 12:50:41 -05:00
target.py Add support for multiple namespaces in Targets 2015-03-12 16:07:51 -04:00
transport.py Update Oslo imports to remove namespace package 2015-01-21 21:09:33 -05:00