【问题标题】:Receiving from ActiveMQ Artemis with artemis-jms-client throws InvalidDestinationException使用 artemis-jms-client 从 ActiveMQ Artemis 接收会抛出 InvalidDestinationException
【发布时间】:2017-03-22 23:23:05
【问题描述】:

我的代码中有这个

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)

【问题讨论】:

    标签: activemq-artemis


    【解决方案1】:

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

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

    【讨论】:

      【解决方案2】:

      我使用了错误版本的artemis-jms-client。我的代理是 Artemis 2.0.0,我使用的是 artemis-jms-client 1.5.3。

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

      我已经犯过一次这个错误,所以我在这里发布它以防它帮助其他人,或者我第三次。

      【讨论】:

        猜你喜欢
        • 2020-10-20
        • 2021-06-09
        • 2021-05-16
        • 1970-01-01
        • 2020-02-24
        • 1970-01-01
        • 1970-01-01
        • 2020-10-09
        • 1970-01-01
        相关资源
        最近更新 更多