2017-03-22 72 views
1

我有这个在我的代码从ActiveMQ的Artemis的接收与ARTEMIS-JMS客户端抛出InvalidDestinationException

consumer = session.createConsumer(session.createQueue("myQueue")); 

它抛出以下异常

javax.jms.InvalidDestinationException: AMQ119019: Queue already exists test_simple_transaction_receiver 
     at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:406) 
     at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:304) 
     at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.createQueue(ActiveMQSessionContext.java:546) 
     at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.internalCreateQueue(ClientSessionImpl.java:1622) 
     at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.createQueue(ClientSessionImpl.java:249) 
     at org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:628) 
     at org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:331) 
     at consumeMessage(ReceiverClient.java:143) 

回答

1

Artemis 2.0.0有一个新的寻址模型。如果您需要向后兼容,则必须以旧客户端连接的方式配置接收器。

所以,我会建议只更新您的客户端。

1

我用的artemis-jms-client版本错误。我的经纪人是Artemis 2.0.0,我用的是artemis-jms-client 1.5.3。

使用匹配的客户端库版本,接收工作。

我犯了这个错误已经一次,所以我张贴它在这里的情况下,它可以帮助别人,或者我第三次依然。

相关问题