On 09/29/2013 08:53 AM, HellKnight wrote:
I am using activemq 5.8.0 , VS 2010 , windows xp sp2 , .NET 4.0 AND NMS ,
writing code in C#.
Pseudo code of my program is like this :
....Open connection with activemq broker......
....start a consumer with async mode.......
.............................................................
public void OnMessage(IMessage message)
{
.... add the received message to a list , and ack it later ...
}
.......ack the message somewhere else
The problem is :
After I call message.ackowledge(), every message received before the called
message is acked.
I do some debugging and found out that the param of OnMessage callback
method --"IMessage message" --always refer to the same reference. So every
message I saved in my to-ack-list actually refers to the same object in main
memory. I think that is the cause of my problem. Is that true? And how could
I fix this? Please help and thanks in advance.
--
View this message in context:
http://activemq.2283324.n4.nabble.com/Individual-Acknowledgement-seems-not-working-in-NMS-tp4671953.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Not enough info to say. What is the acknowledge mode for the session
you create, if its not individual ack then message ack is working as
expected. Provide more info, version, sample code etc if you really
want help.
--
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.b...@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/