17:18:29,622 ERROR [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:] at 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] at 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]
答案 0 :(得分:1)
您使用的是哪个版本?
这可能是由您的客户端message.acknowledge两次引起的......或者您是否滥用了会话边界。会话意味着属于一个线程。 (包括在会话中创建的对象(消费者,生产者等)。
你可以切换线程..但你必须保持一个线程到会话。