OpenStack library for messaging
Go to file
Hervé Beraud 1fd461647f Force creating non durable control exchange when a precondition failed
Precondition failed exception related to durable exchange
config may be triggered when a control exchange is shared
between services and when services try to create it with
configs that differ from each others. RabbitMQ will reject
the services that try to create it with a configuration
that differ from the one used first.

This kind of exception is not managed for now and services
can fails without handling this kind of issue.

These changes catch this kind exception to analyze if they
related to durable config. In this case we try to re-declare
the failing exchange/queue as non durable.

This problem can be easily reproduced by running a local RabbitMQ
server.

By setting the config below (sample.conf):

```
[DEFAULT]
transport_url = rabbit://localhost/
[OSLO_MESSAGING_RABBIT]
amqp_durable_queues = true
```

And by running our simulator twice:

```
$ tox -e venv --  python tools/simulator.py -d rpc-server -w 40
$ tox -e venv --  python tools/simulator.py --config-file ./sample.conf -d rpc-server -w 40
```

The first one will create a default non durable control exchange.
The second one will create the same default control exchange but as
durable.

Closes-Bug: #1953351
Change-Id: I27625b468c428cde6609730c8ab429c2c112d010
2021-12-15 13:56:12 +01:00
doc Correctly handle missing RabbitMQ queues 2021-02-04 09:47:08 +00:00
etc Fix spelling typo in output 2015-09-24 18:11:22 +08:00
oslo_messaging Force creating non durable control exchange when a precondition failed 2021-12-15 13:56:12 +01:00
releasenotes Force creating non durable control exchange when a precondition failed 2021-12-15 13:56:12 +01:00
tools Adding pre-commit 2020-09-22 12:35:37 +02: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 Upgrade the pre-commit-hooks version 2021-05-18 11:14:35 +08:00
.stestr.conf Switch to stestr 2018-07-04 08:33:49 +07:00
.zuul.yaml Add Python3 yoga unit tests 2021-09-10 14:35:08 +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
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
requirements.txt Add Support For oslo.metrics 2021-06-08 22:22:37 +08:00
setup.cfg setup.cfg: Replace dashes with underscores 2021-05-13 20:29:03 +08:00
setup.py remove outdated header 2020-02-10 18:33:15 +01:00
test-requirements.txt Adding pre-commit 2020-09-22 12:35:37 +02:00
tox.ini Changed minversion in tox to 3.18.0 2021-06-07 16:58:52 +08:00

README.rst

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.