- kombu4 wraps recoverable errors as OperationalErrors rather than
raising amqp errors
- also, raise a recoverable error and redeclare if for some reason a
message is double acknowledged... previously, this was hidden.
- ensure socket is not none
- use connect method to ensure connection
Currently Kafka driver for an oslo.messaging uses kafka-python==0.9.5
and mostly broken. This package version supports only low level Kafka
producer and consumer API which are marked as deprecated now . Using
of these interfaces bring a big concern to the message processing,
because current KafkaConsumer has not any consuming coordination. This
fact causes a message duplication for the several consumers of one
topic. This behavior is specific to Ceilometer and services which read
and process notifications from other services.
New version of kafka-python allows to use async thread safe message
producers and coordinated consumers .
The driver is currently experimental, python-kafka<1.0.0 API have major
issue described above that can't make the oslo.messaging driver works,
so we prefer having a working driver with a non-synced dependencies, that the
Co-Authored-By: Mehdi Abaakouk <email@example.com>
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
This change adds constraints support by also adding a helper script to
edit the constraints to remove oslo.messaging.
1) Remove hardcoding 'redis' matchmaker from any zmq:// transport because it's
fails in cases zmq+etcd:// or zmq+sentinel:// urls.
2) Allow to use transport_url from config file by removing default value for
args.url option. In this case by default args.url is None and
transport_url will be used from config file.
This patch provide the sync flag:
simulator.py rpc-client --sync call
simulator.py rpc-client --sync fanout
The --sync values means next:
- call: to send sync msg via rpc.call
- fanout: to broadcast sync msg via rpc.fanout to all servers on topic
When clients has sent all messages, the rpc-server will be stopped
automatically and dump statistics to a file (if --json-file is used).
This is much usefull than rough killing the process of the server in
--debug, --is-cast and --is-fanout are defined as args of type=bool.
This means that, for example, if we want to enable debug logging
level, we have to type '--debug True'. But we can also use
'--debug False' in order to do the same, which is very misleading
(in fact, any non-empty string will evaluate to True). This patch
tries to solve this problem by replacing type=bool and
default=False with action='store_true' for these args, so that
we will be able to enable them (they will remain False by default
as before) simply as '--debug' etc.
When we calculate metrics like msg/sec, latency, etc
we expect the start and end time as time of
the first and last processed message:
RPC Server life timeline:
[----0..5 sec----][---5..10 sec---][---10..15 sec--]
waiting clients 10 msg recved wait sigint
expected: duration 5 sec, 2 msg/sec
actual (incorrect): duration 15 sec, 0.6 msg/sec
no reason to set the boundaries if server was idle few seconds
before running of clients and after.
ZeroMQ driver options are current stored into the DEFAULT group.
This change makes the zmq configuration clearer by putting its
options into oslo_messaging_zmq group.
Co-Authored-By: Oleksii Zamiatin <firstname.lastname@example.org>
Now it is possible to stop simulator client and server
by sending SIGINT or SIGTERM signals. Note that both stop
gracefully and it takes some time to do this.
Right now simulator.py expects messages_length.yaml to be in the
current directory and as a result, it is impossible to launch
simulator while you are at the repository root.
The change makes simulator to search for the file in the same
directory as simulator itself is in.
Aligning message sending and stats collection to whole seconds.
This allows to merge data from client and server - useful
for visualization of message flow.
Calculate message latency: for RPC calls on both server-side and
on client-side (round-trip); for RPC cast and NOTIFY on server-side
The message is extended with metadata: sequence id, creation time,
reception time and return time (for RPC calls). For every message
the metadata is stored into MessageStatCollector. To reduce memory
consumption the collector aggregates stats on every second and can
print the ongoing stats to stdout. At the finish the overall stats
NOTIFY tests are changed to be similar to RPC:
* use pre-generated messages
* parameter "-w WAIT_BEFORE_ANSWER" for processing delay
* parameter "--requeue" to re-queue new messages (only those that
miss the cache)
Dependency on scipy results in extra requirements to the system
(include the need of Fortran compiler). With this patch the
weighted random choice algorithm is implemented directly.
"n-t1" as notification topic not really useful. Let's allow
it to be specified from the command line. Also make sure
we set the notification driver as "messaging" by default
The function yaml.load() provides the ability to construct an arbitrary
Python object. For security, we use yaml.safe_load() instead which
limits this ability to simple Python objects(like integers or lists).
* passing targets to rpc-client using -tg arg
so clients can send messages to different targets
* removed redis.flush_db() so we can start
several simulator processes for zmq.
There are files containing string format arguments inside
logging messages. Using logging function parameters should
* Avoid string concatenation during logging, especially
when logging level is disabled.
* Initialize the Randomized strings we will be using
as payloads *before* we start sending the messages
as the string creation takes time and reduces
Gnocchi performs better if measurements are write in batch
When Ceilometer is used with Gnocchi, this is not possible.
This change introduce a new notification listener that allows that.
On the driver side, a default batch implementation is provided.
It's just call the legacy poll method many times.
Driver can override it to provide a better implementation.
For example, kafka handles batch natively and take benefit of this.