5 Replies Latest reply on Sep 22, 2010 2:44 PM by Tim Fox

    ACK after closing the consumer

    Clebert Suconic Master

      I know this is illegal:

       

       

               consumer.close();

       

               for (ClientMessage ack : myMessages)

               {

                  ack.acknowledge();

               }

       

       

       

       

       

       

        //consumerNonPaged.close();

       

      But shouldn't we throw an exception on the client preventing it?

       

      Right now this will cause a NPE at the server.

       

      Low priority issue.. I will create the JIRA. I'm just raising it here.

       

       

      [Thread-0 (group:HornetQ-remoting-threads88416491-2104764160)] 17:20:41,638 SEVERE [org.hornetq.core.protocol.core.ServerSessionPacketHandler]  Caught unexpected exception

      java.lang.NullPointerException

      at org.hornetq.core.server.impl.ServerSessionImpl.individualAcknowledge(ServerSessionImpl.java:525)

      at org.hornetq.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:436)

      at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:471)

      at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:451)

      at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:412)

      at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:459)

      at org.hornetq.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:135)

      at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

      at java.lang.Thread.run(Thread.java:619)