【问题标题】:Reference not found Exception in HornetQ在 HornetQ 中找不到引用异常
【发布时间】:2014-08-26 22:48:27
【问题描述】:
  1. 我正在使用 hornetq,同时有 200 个线程消耗消息。有时我会遇到异常,因为 hornetq 上的负载很大,所以经常触发以下异常。请建议我如何解决这个问题。

17:18:29,622 错误 [org.hornetq.core.server] HQ224016:捕获异常:HornetQException[errorType=ILLEGAL_STATE message=HQ119027:找不到消费者 ID=0 的引用,messageId = 17,179,869,184 queue = jms.queue .ExampleQueue] 在 org.hornetq.core.server.impl.ServerConsumerImpl.acknowledge(ServerConsumerImpl.java:704) [hornetq-server.jar:] 在 org.hornetq.core.server.impl.ServerSessionImpl.acknowledge(ServerSessionImpl.java:634) [hornetq-server.jar:] 在 org.hornetq.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:274) [hornetq-server.jar:] 在 org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:631) [hornetq-core-client.jar:] 在 org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:547) [hornetq-core-client.jar:] 在 org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:523) [hornetq-core-client.jar:] 在 org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:564) [hornetq-server.jar:] 在 org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:72) [hornetq-core-client.jar:] 在 org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88) [jboss-mc.jar:] 在 org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) [jboss-mc.jar:] 在 org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787) [jboss-mc.jar:] 在 org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:281) [jboss-mc.jar:] 在 org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169) [hornetq-core-client.jar:] 在 org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134) [hornetq-core-client.jar:] 在 org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [jboss-mc.jar:] 在 org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) [jboss-mc.jar:] 在 org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555) [jboss-mc.jar:] 在 org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [jboss-mc.jar:] 在 org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [jboss-mc.jar:] 在 org.jboss.netty.channel.socket.oio.OioWorker.process(OioWorker.java:71) [jboss-mc.jar:] 在 org.jboss.netty.channel.socket.oio.AbstractOioWorker.run(AbstractOioWorker.java:73) [jboss-mc.jar:] 在 org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:51) [jboss-mc.jar:] 在 org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [jboss-mc.jar:] 在 org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [jboss-mc.jar:] 在 org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:175) [jboss-mc.jar:] 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40] 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40] 在 java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]

【问题讨论】:

    标签: jms hornetq


    【解决方案1】:

    你用的是什么版本?

    这可能是由于您的客户端 message.acknowledge 两次...或者您滥用会话边界引起的。一个 Session 意味着属于一个线程。 (包括在会话中创建的对象(消费者、生产者……等)。

    你可以切换线程..但你必须保持一个线程到会话。

    【讨论】:

    • 因为我正在为每个线程创建新的会话对象。我仍然收到此错误吗?请建议我如何将 java.concurrent 与 hornetq 一起使用。谢谢你..
    • 更多关于即时消息使用自动确认的信息。在 AUTO-ACKNOWLEDGE 模式下可以发送两次确认??
    猜你喜欢
    • 2013-03-25
    • 2012-11-29
    • 1970-01-01
    • 2016-07-14
    • 1970-01-01
    • 2017-10-15
    • 1970-01-01
    • 2017-01-08
    • 1970-01-01
    相关资源
    最近更新 更多