qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Bakkevig Haugli <fredrik.hau...@gmail.com>
Subject JMS: Dispatcher threads don't disappear after MessageConsumer is closed
Date Wed, 05 Nov 2014 09:18:22 GMT
Hello,



I am working on a project that uses qpid for communication in an OSGi based
system. One bundle creates a connection that other bundles can use through
its OSGi-interface. One problem I have is that whenever a MessageConsumer
is created in the connection bundle, a dispatcher thread is created for it
and this thread lingers on even after the consumer is closed. These threads
show up as 'Dispatcher-<some-number>-Conn-1' in the Netbeans debugging
inteface.


If another bundle for some reason is restarted, it will create new
MessageConsumers which creates new threads without killing the old ones,
even if it tries to clean up after itself by closing its consumers first.
The only way of removing these threads that I have found is to restart the
connection bundle (which closes and creates a new connection), something
that might require restarting all other bundles that use it, which is not
ideal.


These threads does not really cause a direct problem as the application
works fine even though they are running, but having an unbounded number of
threads does not seem like a good thing in the long run.



My question is:

Are these dispatcher threads supposed to carry on after the consumer is
closed, or is there a way to kill them without closing the connection?



Fredrik Bakkevig Haugli

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message