This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Random Failures when running spring integration over amqpPage Title Module

Random Failures when running spring integration over amqp

May 20th, 2012, 05:44 AM

Hi,

I have a weird thing happening. I am using gateways over amqp on both ends (client and server). It seems that when my response is big, it fails randomly. I see that the message is being handled on the server side and I see the correct value returning every time. But for some reason, sometimes it returns to the client successfully and sometimes it just doesn't return.

When you say you see the correct value returning every time, are you referring to server side logging? Also, can you provide any client-side logging excerpts? If you can provide those as well as a simple example that demonstrates the behavior, that would be very helpful for some further investigation.

Thanks,
Mark

Comment

When you say you see the correct value returning every time, are you referring to server side logging? Also, can you provide any client-side logging excerpts? If you can provide those as well as a simple example that demonstrates the behavior, that would be very helpful for some further investigation.

Thanks,
Mark

What I'm seeing is a temp queue being created for the response. The problem is that sometimes, this queue isn't created at all and during those times, the answer is not received by the client.

To answer your question, yes, the correct answer is from the server.

What exactly would you like to see? The spring integration xmls for client server?

Comment

Are you saying there is a replyTo header on the server with a generated queue name, but that queue was never created? The reason I ask is that the replyTo queue name is generated as a result of declaring the queue.

Is it possible the client is timing out before the response is received? In that case, the reply queue will be deleted. The default reply timeout is 5 seconds, but it can be increased using the replyTimeout property on the RabbitTemplate.

Also, the recent spring-amqp 1.1.0 release supports a fixed reply queue, which should work out of the box when the producer and consumer are both Spring Integration applications.

Comment

Are you saying there is a replyTo header on the server with a generated queue name, but that queue was never created? The reason I ask is that the replyTo queue name is generated as a result of declaring the queue.

Is it possible the client is timing out before the response is received? In that case, the reply queue will be deleted. The default reply timeout is 5 seconds, but it can be increased using the replyTimeout property on the RabbitTemplate.

Also, the recent spring-amqp 1.1.0 release supports a fixed reply queue, which should work out of the box when the producer and consumer are both Spring Integration applications.

If I'm using amqp:gateway on both sides, the response from the server is generated sent via a default queue correct? Where is this default queue created? The reply-queue on rabbit:template wouldn't help me in this case correct? I am looking into the timeout factor, that could definitely be a problem. We have serious network latency at the moment. 5s is not a long time at all. I am assuming this timeout needs to be defined on the server side since it is the one generating the default queue to pass back the message to the client right? Or is it the client that generates the default queue?