activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From V Lavilla <valerie.lavi...@simulalabs.com>
Subject Re: processed message from a dead consumer are reassigned
Date Tue, 17 Oct 2006 10:01:14 GMT

Hi fred,

I tried to replicate your problem, but no luck. Here's what I did:

1. used the example producer/consumer in the binary distribution. messages
are distributed to the registered consumers. No message was resent after a
message has been consumed/acknowledged.
2. tried setting an exclusive consumer (description in this site:
http://activemq.org/site/exclusive-consumer.html). After receiving 9messages
i terminated it. messages were successfully consumed and was not reassigned
to other consumers.

It would be great if you can post your client code and settings (if you've
used other settings). 

BTW, I used amq 4.0.1.

Val


fred wrote:
> 
> Hi,
> 
> I find to use mode Session.CLIENT_ACKNOWLEDGE in session creation, and
> call message.acknowledge() explicitly in consumer's onMessage. In this
> way, messages processed by intentionally killed consumer will not be
> reassigned to other alive consumers.
> 
> I am wondering why Session.AUTO_ACKNOWLEDGE mode is not able to notify
> Queue automatically for each processed message. Mabye there is time lapse
> for this purpose? 
> 
> 
> 
> 
> fred wrote:
>> 
>> 
>> 
>> fred wrote:
>>> 
>>> I am newer for ActiveMQ. 
>>> 
>>> Over here, I have a question on why processed messages by a dead
>>> consumer(I intentionally killed it after it processed messages) are
>>> reassigned to other alive consumers and these messages are reprocessed.
>>> 
>>> I just use the exmple producer and consumer going along with the
>>> download package. Register 3 conumers and 1 producer to the queue, and
>>> set Session.AUTO_ACKNOWLEDGE when creating sessions
>>> 
>>> Session session =
>>> connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
>>> 
>>> After consumer1 received and processed 9 messages, I killed it. However,
>>> I found these 9 messages will be reassigned to alive consumer2 and
>>> consumer3. This is redoing the process on these 9 messages. 
>>> 
>>> Anyone have ideas on how to avoid these processed messages get
>>> reassigned to other consumers?
>>> 
>>> Thanks in advance
>>> 
>>> Fred
>>> 
>> 
>> 
> 
> 



-- 
View this message in context: http://www.nabble.com/processed-message-from-a-dead-consumer-are-reassigned-tf2424919.html#a6851866
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message