2017-03-22 74 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。

使用匹配的客戶端庫版本,接收工作。

我犯了這個錯誤已經一次,所以我張貼它在這裏的情況下,它可以幫助別人,或者我第三次依然。

相關問題