Pavel Moravec created QPID-5701:
-----------------------------------
Summary: [AMQP 1.0] C++ client should notify broker about
session.sync() invoked by application
Key: QPID-5701
URL: https://issues.apache.org/jira/browse/QPID-5701
Project: Qpid
Issue Type: Bug
Components: C++ Broker, C++ Client
Affects Versions: 0.26
Reporter: Pavel Moravec
Priority: Minor
Description of problem:
When application using C++ client invokes session.sync() method on AMQP 0-10
connection, the client sends execution.sync AMQP primitive to the broker to get
aligned with the broker asap. While AMQP 1.0 client does not invoke anything
like that, causing the client redundantly waits until the broker decides to
send disposition and flow performatives by itself.
Particular use case:
- send durable messages to a durable queue and time to time (e.g. after N
messages) invoke session.sync() to be synced.
- message throughput is approx. N msgs/sec
- this is caused by store module flushing work done every second (via
MessageStoreImpl::defJournalFlushTimeout = 500ms, not sure why .5s and not 1s
but confirmed to be relevant)
Version-Release number of selected component (if applicable):
upstream (0.28 incl)
How reproducible:
100%
Steps to Reproduce:
1. Apply trivial patch to qpid-send to invoke session.sync() every N message
(--group-size option misused just for the test):
Index: src/tests/qpid-send.cpp
===================================================================
--- src/tests/qpid-send.cpp (revision 1587518)
+++ src/tests/qpid-send.cpp (working copy)
@@ -413,6 +413,9 @@
sender.send(msg);
reporter.message(msg);
+ if (sent % opts.groupSize == 0)
+ session.sync();
+
if (opts.tx && (sent % opts.tx == 0)) {
if (opts.rollbackFrequency &&
(++txCount % opts.rollbackFrequency == 0))
2. qpid-config add queue Durable --durable
3. qpid-send -a Durable -m 100 --connection-options {protocol:amqp1.0}
--group-key=KEY --group-size=1 --report-total --durable=yes
4. qpid-send -a Durable -m 100 --connection-options {protocol:amqp1.0}
--group-key=KEY --group-size=10 --report-total --durable=yes
5. qpid-send -a Durable -m 100 --connection-options {protocol:amqp1.0}
--group-key=KEY --group-size=100 --report-total --durable=yes
Actual results:
tp/s differ extremely, like:
group-size=1 -> tp/s 1
group-size=10 -> tp/s 10
group-size=100 -> tp/s 100
When using AMQP 0-10, the difference isnt such huge and tp/s is in general much
much higher (i.e. 2025 for group-size=10).
Expected results:
AMQP 1.0 client to provide similar results like 0-10
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]