activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Hackemesser <>
Subject strange topic subscriptions not disappearing [V5.5.1]
Date Tue, 07 Feb 2012 23:40:45 GMT
Hi there,

we are still testing AciveMQ in preproduction here. Imagine following

we have two topics here that work as a request/response pair. The data
producer is permanently(not durable) subscribed to the request topic and
puts its payload into the response topic. The client uses a JMS Template
with a SessionCallback to sends its data requests to the request topic and
awaits responses in the response topic. Here the code that matters:

    public Message doInJms(final Session session) throws JMSException {
        MessageConsumer consumer = null;
        MessageProducer producer = null;
        try {
            final String correlationId = UUID.randomUUID().toString();

            consumer = session.createConsumer(responseDestination,
"JMSCorrelationID = '" + correlationId + "'");

            final ObjectMessage message =
            message.setStringProperty("CLIENT_ID", clientUid);
            message.setStringProperty("GSE_ID", gseUid);
            producer = session.createProducer(requestDestination);

            return consumer.receive(TIMEOUT);
        } finally {
            // Don't forget to close your resources

>From my understanding this creates the consumer, subscribes to the response
topic, creates the producer, sends the request, waits for the response or
the timeout(5000) and then finally closes producer and consumer on the
client side. Nevertheless I found by chance on the JMX console that our
running client has created subscriptions to the topic that sit there
constantly and aren't closed. Currently there are 37 connections to the
response topic, all coming from one connection. How could that happen?


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