qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Rolke <cro...@redhat.com>
Subject Re: Why performance of sending durable messages to qpid queue is really bad?
Date Sat, 21 Jun 2014 12:01:35 GMT
Also in passing the original code doesn't calculate the time delta correctly.

>    seconds  = end.tv_sec  - start.tv_sec;
>    useconds = end.tv_usec - start.tv_usec;
>    mtime = ((seconds) * 1000 + useconds/1000.0) + 0.5;

fails to account for the borrow from microseconds into seconds so you will get odd results
regularly.
Use timersub() to calculate the delta. Info in man timeradd.

----- Original Message -----
> From: "smartdog" <jwjjj1983@gmail.com>
> To: users@qpid.apache.org
> Sent: Tuesday, June 17, 2014 2:10:52 PM
> Subject: Why performance of sending durable messages to qpid queue is really bad?
> 
> 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-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
> 

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


Mime
View raw message