[rabbitmq-discuss] RabbitMQ C library function amqp_simple_wait_frame takes 400 ms
Tony Garnock-Jones
tonyg at lshift.net
Thu Jul 1 02:53:04 BST 2010
Hi Jim,
I think it's possible that Brett is on the right track with his suggestion of
the Nagle algorithm being responsible for the delays. You could try the following:
int one = 1;
setsockopt(amqp_get_sockfd(conn),
IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
Cheers,
Tony
Jim Irrer wrote:
> Hi All -
>
> I'm working on two functions that act as a client-server pair. They
> use two amq.direct queues to communicate. When ever either of
> them calls the amqp_simple_wait_frame function, it does not return
> for 436618 microseconds.
>
> Some other background info that might be relevant:
>
> If I only send messages in one direction it's really fast.
>
> Both processes are using separate connectors and different sockets.
>
> I used the amqp_consumer.c amqp_producer.c code in
> the examples directory as a reference.
>
> Is there a way to avoid this delay?
>
> Also ...
>
> Could I use the same socket in each program as long as it was only
> used by one thread at a time?
>
> Could I use the same connection in each program if it was only
> used by one thread at a time?
>
> Thanks for any insights,
>
> - Jim
>
> Jim Irrer irrer at umich.edu <mailto:irrer at umich.edu> (734) 647-4409
> University of Michigan Hospital Radiation Oncology
> 519 W. William St. Ann Arbor, MI 48103
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list