Hi Gary, I should have said that according to JMX, there are zero consumers on that topic after unsubscribe.
I'm very puzzled. Paul On 23 Jun 2011, at 18:23, Gary Tully <gary.tu...@gmail.com> wrote: > your understanding is correct, sounds like there is some other > consumer on there. > > checkout the test case: > org.apache.activemq.usecases.DurableSubscriptionOfflineTest#testRemovedDurableSubDeletes > > or some variant if to validate what you are seeing. > http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java?view=markup > > > On 23 June 2011 16:46, Paul Woodward <paul.woodw...@gmail.com> wrote: >> Hi Guys, >> >> I'm trying to understand the exact behaviour of session.unsubscribe() >> when using a durable consumer on a topic in ActiveMQ 5.5. >> >> The scenario I have is as follows: >> >> 1. I create a message producer continuously publishing to a topic. >> 2. I create a single durable message consumer. >> 3. Later, I call session.unsubscribe() in the consumer. >> >> My expectation is that ActiveMQ would then drop all messages for this >> topic as there are no durable/non-durable consumers registered. >> However what I witness is that ActiveMQ ether runs out of memory or >> throttles the producer complaining that messages are not being >> consumed fast enough. Looking at the topic statistics, I see that the >> enqueue count keeps rising, evicted is 0, inflight is constant at >> something small and dequeue is constant. >> >> Can anyone explain what is happening and how I should have configured >> ActiveMQ for my expected behaviour? >> >> Thanks in advance, >> >> Paul >> > > > > -- > http://fusesource.com > http://blog.garytully.com