OpenStack library for messaging
Go to file
Arnaud Morin 36fb5bceab Set default heartbeat_rate to 3
Kombu recommend to run heartbeat_check every seconds but we use a lock
around the kombu connection so, to not lock to much this lock to most of
the time do nothing except waiting the events drain, we start
heartbeat_check and retrieve the server heartbeat packet only two times
more than the minimum required for the heartbeat works:
    heartbeat_timeout / heartbeat_rate / 2.0

Because of this, we are not sending the heartbeat frames at correct
intervals. E.G.

If heartbeat_timeout=60 and rate=2, AMQP protocol expects to send a
frame
every 30sec.

With the current heartbeat_check implementation, heartbeat_check will be
called every:
    heartbeat_timeout / heartbeat_rate / 2.0 = 60 / 2 / 2.0 = 15
Which will result in the following frame flow:
    T+0  --> do nothing (60/2 > 0)
    T+15 --> do nothing (60/2 > 15)
    T+30 --> do nothing (60/2 > 30)
    T+45 --> send a frame (60/2 < 45)
    ...

With heartbeat_rate=3, the heartbeat_check will be executed more often:
    heartbeat_timeout / heartbeat_rate / 2.0 = 60 / 3 / 2.0 = 10
Frame flow:
    T+0  --> do nothing (60/3 > 0)
    T+10 --> do nothing (60/3 > 10)
    T+20 --> do nothing (60/3 > 20)
    T+30 --> send a frame (60/3 < 30)
    ...

Now we are sending the frame with correct intervals

Closes-bug: #2008734

Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: Ie646d254faf5e45ba46948212f4c9baf1ba7a1a8
2023-08-08 15:23:59 +02:00
doc Fix typo in quorum-related variables for RabbitMQ 2023-02-14 15:20:00 +00:00
etc Fix spelling typo in output 2015-09-24 18:11:22 +08:00
oslo_messaging Set default heartbeat_rate to 3 2023-08-08 15:23:59 +02:00
releasenotes Set default heartbeat_rate to 3 2023-08-08 15:23:59 +02:00
tools tox cleanups 2023-01-18 17:00:10 +00:00
.coveragerc Update .coveragerc after the removal of respective directory 2016-10-18 17:20:09 +05:30
.gitignore Ignore releasenote cache within git untracked files 2019-12-18 17:03:10 +01:00
.gitreview OpenDev Migration Patch 2019-04-19 19:31:51 +00:00
.pre-commit-config.yaml update hacking pin to support flake8 3.8.3 2022-05-23 14:39:56 +00:00
.stestr.conf Switch to stestr 2018-07-04 08:33:49 +07:00
.zuul.yaml Add Python3 zed unit tests 2022-03-04 17:18:29 +00:00
babel.cfg Setup for translation 2014-06-05 22:48:44 +02:00
bindep.txt Merge "bindep: Add 'librdkafka-dev' dependency" 2021-04-16 13:11:15 +00:00
CONTRIBUTING.rst Align contributing doc with oslo's policy 2020-05-04 18:25:31 +02:00
HACKING.rst Update URLs in documents according to document migration 2017-07-12 22:54:02 +08:00
LICENSE Add oslo.messaging project infrastructure 2013-06-15 08:43:50 +01:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-04-26 10:31:26 +08:00
requirements.txt Add Support For oslo.metrics 2021-06-08 22:22:37 +08:00
setup.cfg Drop python3.6/3.7 support in testing runtime 2022-05-05 16:06:49 +02:00
setup.py remove outdated header 2020-02-10 18:33:15 +01:00
test-requirements.txt update hacking pin to support flake8 3.8.3 2022-05-23 14:39:56 +00:00
tox.ini tox cleanups 2023-01-18 17:00:10 +00:00

Team and repository tags

image

Oslo Messaging Library

Latest Version

Downloads

The Oslo messaging API supports RPC and notifications over a number of different messaging transports.