summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorKiall Mac Innes <kiall@hp.com>2013-06-28 21:14:26 +0100
committerKiall Mac Innes <kiall@hp.com>2013-07-08 11:27:01 +0100
commitc37f6aaab3ac00b7865dee18158114433350237e (patch)
tree2e43ded39aa3bfb3d759f23c38114d119d480f0a /openstack
parentbc7e5c8996c1c16a90defc65519f8497e345d91d (diff)
downloadoslo-c37f6aaab3ac00b7865dee18158114433350237e.tar.gz
oslo-c37f6aaab3ac00b7865dee18158114433350237e.tar.xz
oslo-c37f6aaab3ac00b7865dee18158114433350237e.zip
Add support for heartbeating in the kombu RPC driver
This aides in detecting connection interruptions that would otherwise go unnoticed. Fixes bug #856764 Change-Id: Id4eb3d36036969b62890175d6a33b4e304be0527
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/rpc/impl_kombu.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/openstack/common/rpc/impl_kombu.py b/openstack/common/rpc/impl_kombu.py
index 8fb3504..ce8f2d8 100644
--- a/openstack/common/rpc/impl_kombu.py
+++ b/openstack/common/rpc/impl_kombu.py
@@ -83,6 +83,9 @@ kombu_opts = [
default=0,
help='maximum retries with trying to connect to RabbitMQ '
'(the default of 0 implies an infinite retry count)'),
+ cfg.IntOpt('rabbit_heartbeat',
+ default=60,
+ help='Seconds between connection keepalive heartbeats'),
cfg.BoolOpt('rabbit_durable_queues',
default=False,
help='use durable queues in RabbitMQ'),
@@ -450,6 +453,7 @@ class Connection(object):
'userid': self.conf.rabbit_userid,
'password': self.conf.rabbit_password,
'virtual_host': self.conf.rabbit_virtual_host,
+ 'heartbeat': self.conf.rabbit_heartbeat,
}
for sp_key, value in server_params.iteritems():