3 Replies Latest reply on Oct 19, 2009 7:26 AM by Radim Chlad

    HornetQ not clearing up resources

    Radim Chlad Newbie

      Hi,
      I have hornetQ standalone server on one machine (w2003,java6)
      and two java programs (consumer & produces) on the second one (my notebook winXP,java6) (using Netty as transport layer)
      Producer connects to HornetQ and sends short text messages to my 'mesQueue'.
      Consumer is receiving those ones and everything works great.
      But in real scenario there is unreliable network connection, so I'm testing
      my app like this:

      I try to plug-off network patch cable from my notebook's eth card.
      and back plug it in.
      Of course both clients (producer and consumer) have got exceptions as I expected.
      After plugging the network cable in, producer continues to send messages and I restart consumer.

      And now:
      I can see through JMX (at HornetQ side) that 'mesQueue' has now 2 consumers
      one active and second one probably a serverside-'zombie' of consumer being restarted after network plug-in.
      I expected the older one to expire, but it didn't. I it stays there for hours, even when I stopped current consumer & producer.

      Is it correct behavior? I think those resources should be cleared up (after default time period 5 min?) I didn't changed any default settings related to this.

      And I have one more question: It is possible to discover what zombie (connection) is subscribed as consumer to particular queue?

      I know I can disconnect any connection through jmx, but how can I discover which one right to be disconnected?

      I have use case where one-and-only-one consumer have to consume messages
      and in conditions like this zombie is 'consuming' some of them (they haven't been received by 'really-live' consumer!)

      I was facing this problem in old-good jboss-messaging 1.4 deployed @ jboss 4
      (there I don't have no other solution then restarting complete jboss when this situation occurred)
      and that was the reason why I want to migrate to HornetQ (not in jboss just standalone), but the symptoms at HornetQ seems to be the same.

      Has someone some experiences with behavior like this?

      Thanks

      Radimch