我的代码里有这个
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)发布于 2017-03-22 15:23:05
Artemis 2.0.0有一个新的寻址模型。如果您需要向后兼容性,则必须以老客户端连接的方式配置接收方。
所以,我建议你更新一下你的客户。
发布于 2017-03-22 09:49:55
我使用了错误的artemis-jms-client版本。我的代理是Artemis2.0.0,我使用了artemis-jms-client 1.5.3。
具有匹配的客户端库版本,接收工作。
我已经犯了一次错误,所以我在这里张贴,以防它帮助别人,或者我第三次。
https://stackoverflow.com/questions/42947916
复制相似问题