I don't think that the client library (Proton) has anything to do with this disparity of latency. It is simply waiting for settlement from the broker because of the synchronous send.
What kind of broker are you using and how is the message store on it configured? -Ted On 06/17/2014 02:10 PM, smartdog wrote: > With Proton c++ client, it seems sending an undurable message to a qpid queue > takes 1-3ms, while sending a durable message takes static 1000ms. Is it by > design? Why does it take so much time? > > My code: > pn_message_set_durable(message, true); > > for(i=0;i<10;i++){ > gettimeofday(&start, NULL); > printf("sending %d ", i); > pn_messenger_put(messenger, message); > messageTracker = pn_messenger_outgoing_tracker(messenger); > pn_messenger_send(messenger, -1); > > pn_status_t trackerStatus = pn_messenger_status(messenger, > messageTracker); > if(trackerStatus != PN_STATUS_ACCEPTED) printf("send Azure failed! %d\n", > trackerStatus); > else pn_messenger_settle(messenger,messageTracker,0); > > gettimeofday(&end, NULL); > seconds = end.tv_sec - start.tv_sec; > useconds = end.tv_usec - start.tv_usec; > mtime = ((seconds) * 1000 + useconds/1000.0) + 0.5; > printf(" after send one Elapsed time: %ld milliseconds\n", mtime); > } > > > > -- > View this message in context: > http://qpid.2158936.n2.nabble.com/Why-performance-of-sending-durable-messages-to-qpid-queue-is-really-bad-tp7609368.html > Sent from the Apache Qpid users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org > For additional commands, e-mail: users-h...@qpid.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org