ActiveMQ在发布之前删除目标

时间:2017-06-13 12:00:17

标签: jms activemq

为什么这次溃败会引发异常以及如何解决这个问题? 生产者:

 from("rmi:endpoint").
.setHeader(JmsHeaders.DELIVERY_MODE, constant("PERSISTENT"))
.to(ExchangePattern.InOut, "activemq:myQueue?requestTimeout=86400000");

消费者:

from("activemq:myQueue").to("http://....")

例外:

org.apache.camel.RuntimeCamelException: org.springframework.jms.InvalidDestinationException: Cannot publish to a deleted Destination: temp-queue://ID:stws2503-55943-1497338780769-6:1:1

更新

        <artifactId>activemq-broker</artifactId>
        <version>5.14.5</version>

添加参数

broker.url=tcp://localhost:61616?transport.useInactivityMonitor=false

仍然抛出异常

发现问题:

temp-queue 中的问题,因为它在内存中并且在重新启动服务器目标后不存在,我怎么能避免这个问题?任何想法??

我尝试更改setUseTempMirroredQueues(false)broker.setCacheTempDestinations(false)

1 个答案:

答案 0 :(得分:0)

问题解决了。我刚刚添加了参数replyToType=ExclusivereplyTo