Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Mehdi Abaakouk
committed
Mar 18, 2015
1 parent
ec68634
commit b9e134d
Showing
8 changed files
with
424 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.