On 18/06/14 09:13, Gordon Sim wrote:
On 06/17/2014 10:35 PM, smartdog wrote:
It is the qpid c++ broker. The BDB store is used. Is there a way to improve
the performance while preserving the persistence?

Can you send messages in batches? I.e. don't make every send synchronous.

A synchronous send will always be a little slower and for the c++ broker if the message is durable there is an added penalty at present over AMQP 1.0 as the broker doesn't flush the disk immediately (it doesn't get any explicit indication that the client is not going to send anything else until it gets back the disposition for the message).


Pavel & Gordon, smartdog's original comment said "sending an undurable message to a qpid queue takes 1-3ms, while sending a durable message takes static 1000ms" taking 1 second does seem awfully high even given the synchronous and flush comments, clearly the message size may be significant, but I'm guessing if he was sending *really big* messages he'd have said so it's probably not significant here, so the flush delay seems plausible.

what determines when the flush occurs?


smartdog, as a thought one thing that you could try would be to use the qpid spout program to try and send a message. The spout program uses qpid::messaging so you could use that approach to rule out any quirks that may exist in the interactions with messenger, you can also set it to use either AMQP 0.10 or AMQP 1.0 so you should be able to check if the AMQP 1.0 flush thing is the most likely issue, basically if it goes fast set to AMQP 0.10 and slower when set to AMQP 1.0 then that would *probably* point to it being the culprit.


spout lives in <qpid>/cpp/<bld>/examples/messaging
where <qpid> is the root of the source tree and <bld> is your cmake build directory.


The basic syntax to send a message in AMQP 1.0 is:

./spout --connection-options {protocol:amqp1.0} -b localhost --content "Hello World" "<destination-node>"

where destination-node is the name of the queue/exchange you want to send the message to. For AMQP 0.10 it's just:

./spout -b localhost --content "Hello World" "<destination-node>"

To make the message durable I think you simply use the -d option e.g.

./spout --connection-options {protocol:amqp1.0} -d -b localhost --content "Hello World" "<destination-node>"

or-

./spout -d -b localhost --content "Hello World" "<destination-node>"

Regards,
Frase




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to