camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Perrett <jrmpatw...@gmail.com>
Subject requestReply with temporary queues in failover situations
Date Thu, 03 Oct 2013 12:37:21 GMT
Hi,

I have a cluster of brokers and have noticed some problems during failover
situations that I¹m uncertain how to handle.

I use request/reply with the default temporary queue mechanism provided by
camel:

producerTemplate.requestBody(myMessage);



Under certain conditions this seems to be dispatching messages with a
replyTo queue that no longer exists. The logs of the system replying contain
the following stacktrace:



Caused by: javax.jms.InvalidDestinationException: Cannot publish to a
deleted Destination: temp-queue://ID:testbrk01-53600-1380629398120-5:39:1

        at 
org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1721)

        at 
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.jav
a:277)

        at 
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.jav
a:212)

        at 
org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:79)

        at 
org.apache.activemq.pool.PooledProducer.send(PooledProducer.java:62)

        at 
org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)

        at 
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsC
onfiguration.java:278)

        at 
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDes
tination(JmsConfiguration.java:217)

        at 
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(
JmsConfiguration.java:159)

        at 
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(J
msConfiguration.java:202)

        at 
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)



When it gets into this state the problem will persist for the lifetime of
the producer system. Only a system restart fixes it.

It¹s also worth noting that the brokers are configured with
cacheTempDestinations=true (although AFAIK this only applies to broker
restarts < 5 seconds by default).



1. Why does the producer system continue to dispatch messages with deleted
replyTo queue and is there anyway to prevent this?

2. With a broker cluster are temporary queues shared across brokers?

* So if the broker that created the temp queue gets restarted would the temp
queue persist if other brokers stay up in the cluster?

3. Is it just a bad idea to be using temp queues for request reply in
failover situation?



If anyone has any insight I¹d be very grateful.

We¹re using camel 2.10.3  & activemq 5.8.0.



Thanks in advance!



Jack 






Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message