No subject


Thu Mar 14 15:04:54 GMT 2013


I assume you're detecting timeout by looking for AMQP_STATUS_TIMEOUT in
result?

-Alan


On Wed, Sep 25, 2013 at 11:02 PM, Lothe Shashank <
Shashank.Lothe at techmahindra.com> wrote:

>  Hi Alan,
>
> Thanks for the earlier prompt replies. I am trying*amqp_simple_wait_frame_noblock
> * API in amqp_listen.c example from rabbitmq-c library. I have
> successfully opened new connection and channel and created queue for this
> listner. I want the frame to wait for 10 seconds to receive the message
> sent by sender. I declared the timeout as follows.
>
> struct timeval timeout;
> timeout.tv_sec = 10;
> timeout.tv_usec = 0;
>
> result = amqp_simple_wait_frame_noblock(conn, &frame, &timeout);
>
> However I noticed that this API is not waiting for 10seconds and I am
> getting timeout in around 1-2seconds. Could you please provide a snippet
> for the usage of this API as I was not able to get it from the current
> examples?
>
> Thanks and regards,
> Shashank
>
> ------------------------------
>
> DISCLAIMER:
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>

--f46d0418258cb77a4c04e7572f09
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The amqp_consume_message() function in amqp_consume.c prov=
ides a good example how to correctly use amqp_simple_wait_frame_noblock().<=
div><br></div><div><a href=3D"https://github.com/alanxz/rabbitmq-c/blob/mas=
ter/librabbitmq/amqp_consumer.c#L136">https://github.com/alanxz/rabbitmq-c/=
blob/master/librabbitmq/amqp_consumer.c#L136</a><br>
</div><div><br></div><div>From the limited code snippet, it looks like you&=
#39;re doing things correctly, I assume you&#39;re detecting timeout by loo=
king for AMQP_STATUS_TIMEOUT in result?</div><div><br></div><div>-Alan</div=
>
</div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed,=
 Sep 25, 2013 at 11:02 PM, Lothe Shashank <span dir=3D"ltr">&lt;<a href=3D"=
mailto:Shashank.Lothe at techmahindra.com" target=3D"_blank">Shashank.Lothe at te=
chmahindra.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">




<div>
<div style=3D"direction:ltr;font-size:10pt;font-family:Tahoma">Hi Alan,<br>
<br>
Thanks for the earlier prompt replies. I am trying<b> amqp_simple_wait_fram=
e_noblock</b> API in amqp_listen.c example from rabbitmq-c library. I have =
successfully opened new connection and channel and created queue for this l=
istner. I want the frame to wait
 for 10 seconds to receive the message sent by sender. I declared the timeo=
ut as follows.<br>
<br>
struct timeval timeout;<br>
timeout.tv_sec =3D 10;<br>
timeout.tv_usec =3D 0;<br>
<br>
result =3D amqp_simple_wait_frame_noblock(conn, &amp;frame, &amp;timeout);<=
br>
<br>
However I noticed that this API is not waiting for 10seconds and I am getti=
ng timeout in around 1-2seconds. Could you please provide a snippet for the=
 usage of this API as I was not able to get it from the current examples?<b=
r>

<br>
Thanks and regards,<br>
Shashank</div>
<br>
<hr>
<font face=3D"Arial" color=3D"Navy"><br>
DISCLAIMER:<br>
This email (including any attachments) is intended for the sole use of the =
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIV=
ATE COMPANY INFORMATION. Any review or reliance by others or copying or dis=
tribution or forwarding of any or
 all of the contents in this message is STRICTLY PROHIBITED. If you are not=
 the intended recipient, please contact the sender by email and delete all =
copies; your cooperation in this regard is appreciated.<br>
</font>
</div>

<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href=3D"mailto:rabbitmq-discuss at lists.rabbitmq.com">rabbitmq-discuss at lis=
ts.rabbitmq.com</a><br>
<a href=3D"https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-dis=
cuss" target=3D"_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo=
/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div>

--f46d0418258cb77a4c04e7572f09--


More information about the rabbitmq-discuss mailing list