The test spawns a greenthread and expects it to complete after
eventlet.sleep(0) call. The problem is that if there are other
greenthreads currently running, sleep(0) may switch to unexpected
thread, which may result in test thread not being invoked at all.
Instead of assuming no other green threads are running at the moment
of test execution, explicitly wait() for the test thread.
Change-Id: Id45307860733658638b74ed3a713493df8c1080d
Closes-Bug: #1282706
This simplifies usage of messaging_conf fixture, reduces explicit
cleanup and option registration code in unit tests.
Change-Id: If1dea548c4a58abfc8ce4967710a061c9058628c
There is a bug in pyflakes that may trigger F811 violation when import
is not used in a file before its redefinition in local class method
scope, even though it's used in other classes later in the same file.
Change-Id: Ie611e2ff93c59b01a2695c3d944cfe118f874547
Related-Bug: #1297161
Use the config object in the base class, and define a local
base class for managing connections instead of repeating
that code in several places.
Change-Id: I7816a467da449ba172dbaa23e58b511adc1ba40a
The RabbitMQ driver is the default driver for oslo.messaging, so it
makes some sense to require this by default. This is consistent with
the way e.g. Nova has always required kombu.
Change-Id: Ibcab58e3f3edce794b571cfabc0a5bcf96c9b47e
Closes-Bug: #1288425
Drivers have a notify_send() method which allows for special semantics
to be implemented for notification sending. During the port over to
oslo.messaging, it appears we stopped using this and switched to just
using topic_send() instead.
Lets restore the use of notify_send() so that we don't lose behaviours
like I9f8dfd6eaf3996be58fecff6ad91508bdcef23f3 added.
Change-Id: Id0ad0431d3e2b1bfe21723e7f3b1842c2d3a9546
We don't need vim modelines in each source file, it can be set in
user's vimrc.
Change-Id: I615f1ffc7e097f1ddbd908a512f1cb988489e871
Closes-Bug: #1229324
When log_handler.py was added to oslo.messaging changes weren't made to
publish the documentation. This patch ensures the docs for log_handler
are built.
Change-Id: Ibf60f648ad07875fb4c61427e601b6b268a95f53
Closes-Bug: 1286984
sslutils is the only oslo-incubator module we use which registers any
config options, and we don't even use those config options at runtime.
The problem with us using oslo-incubator config options is that they
need to be exactly in sync with the oslo-incubator version of those
used by every project using oslo.messaging.
Avoid all this be inlining validate_ssl_version() until we have it
available in a real library.
Change-Id: Id3b0bb2e7ede33ede9b66025d1af113ae60cfc58
Closes-Bug: #1287542
Fix up the imports so that the log handler for publishing
error messages is available through the oslo.messaging
package instead of users having to know the full path
inside the sub-module.
Change-Id: I5c8ddaf451f7c977d8c400fe920512cdafbc7fdf
Some information about the notification (ie: message_id and timestamp)
are currently not available for the application.
This change add them.
Partial implements blueprint notification-subscriber-server
Change-Id: I83e562725205fb270f6065fe1118c3c9865b2294
In commit d8d2ad9 we added support for notification listener endpoint
methods to return REQUEUE, but if a driver does not support this we
raise NotImplementedError when the application attempts to requeue
a message.
This requeuing behaviour might only be used by an application in
unusual, exceptional circumstances and catch users by surprise.
Instead, let's require the application to assert that it needs this
feature in advance and raise NotImplementError at that point if the
driver doesn't support it.
Change-Id: Id0bb0e57d2dcc1ec7d752e98c9b1e8e48d99f35c
In commit d8d2ad9 we delayed when a message's unique ID gets added to
the duplicate message cache in order to allow for message requeueing.
However, as part of this, we exposed the private _unique_id field
outside of the driver. This commit reverses that change by storing
the ID in the AMQPIncomingMessage object.
Change-Id: Ibeb7896de7ad9abf3c6a43495c1a87aabb762c0d
This patch allow the FakeListener to listen on multiple FakeExchange.
Partial implements blueprint notification-subscriber-server
Change-Id: I9830cc01efdd931f6628853f7e84b947d7b855c9
This patch allow to requeue the notification received by the
notification listener.
Partial implements blueprint notification-subscriber-server
Change-Id: I49c4ba91224c280e479edb19289ccb337a2ab843
For a rationale for this patch, see the discussion surrounding Bug
When reconnecting to a RabbitMQ cluster with mirrored queues in
use, the attempt to release the connection can hang "indefinitely"
somewhere deep down in Kombu. Blocking the thread for a bit
prior to release seems to kludge around the problem where it is
otherwise reproduceable.
DocImpact
Change-Id: Ic2ede3046709b831adf8204e4c909c589c1786c4
Partial-Bug: 856764
Remove py33 from the list of environments used when someone
runs "tox" without any arguments. The python 3.3 tests do
not pass yet, and the expected failure is confusing to new
contributors.
Change-Id: I1f1307153c4a32e59bcffbf340c31dbf3e70173c
With mirrored queues and clustered rabbit nodes a queue is still
mastered by a single rabbit node. When the rabbit node dies an
election occurs amongst the remaining nodes and a new master is
elected. When a slave is promoted to master it will close all the
open channels to its consumers but it will not close the
connections. This is reported to consumers as a consumer cancel
notification (CCN). Consumers need to re-subscribe to these queues
when they recieve a CCN.
kombu 2.1.4+ reports CCNs as channel errors. This patch updates
the ensure function to be more inline with the upstream kombu
functionality. We now monitor for channel errors as well as
connection errors and initiate a reconnect if we detect an error.
Change-Id: Ie00f67e65250dc983fa45877c14091ad4ae136b4
Partial-Bug: 856764