You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Andrew M <an...@oc384.net> on 2008/04/02 16:07:19 UTC
retroactive consumer still dropping msgs...
My retroactive consumer is still only saving the most recent 797 messages.
The complete code for an app demonstrating this is here:
http://www.nmedia.net/~andrew/tmp/CommandLinePublisher.java
It connects, sends 5000 msgs, disconnects, then creates a consumer and
subscribes.
It ends with
received #791 msg text='sent msg #4993'
received #792 msg text='sent msg #4994'
received #793 msg text='sent msg #4995'
received #794 msg text='sent msg #4996'
received #795 msg text='sent msg #4997'
received #796 msg text='sent msg #4998'
received #797 msg text='sent msg #4999'
Any ideas what's wrong here?
Thanks,
Andrew
RE: retroactive consumer still dropping msgs...
Posted by Andrew M <an...@oc384.net>.
Are you sure? Would that explain why I'm getting only the most recently sent
messages? What happened to the first 4800 of 5000?
Thanks,
Andrew
-----Original Message-----
From: liushk [mailto:liushk@qq.com]
Sent: Wednesday, April 02, 2008 7:37 PM
To: users@activemq.apache.org
Subject: Re: retroactive consumer still dropping msgs...
it looks like you need "acknowledge" the received messages
Andrew M-2 wrote:
>
> My retroactive consumer is still only saving the most recent 797 messages.
> The complete code for an app demonstrating this is here:
>
>
>
> http://www.nmedia.net/~andrew/tmp/CommandLinePublisher.java
>
>
>
> It connects, sends 5000 msgs, disconnects, then creates a consumer and
> subscribes.
>
>
>
> It ends with
>
>
>
> received #791 msg text='sent msg #4993'
>
> received #792 msg text='sent msg #4994'
>
> received #793 msg text='sent msg #4995'
>
> received #794 msg text='sent msg #4996'
>
> received #795 msg text='sent msg #4997'
>
> received #796 msg text='sent msg #4998'
>
> received #797 msg text='sent msg #4999'
>
> Any ideas what's wrong here?
>
> Thanks,
>
> Andrew
>
>
>
>
>
--
View this message in context:
http://www.nabble.com/retroactive-consumer-still-dropping-msgs...-tp16451630
s2354p16456889.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: retroactive consumer still dropping msgs...
Posted by ttmdev <jo...@ttmsolutions.com>.
I don't think he needs to acknowledge. It appears he's using an asynchronous
receiver w/in an AUTO_ACKNOWLEDGE session. In this scenario, the
acknowledgment occurs automatically when the onMessage method returns.
Joe
Goto www.ttmsolutions.com for a free ActiveMQ user guide
liushk wrote:
>
> it looks like you need "acknowledge" the received messages
>
>
>
> Andrew M-2 wrote:
>>
>> My retroactive consumer is still only saving the most recent 797
>> messages.
>> The complete code for an app demonstrating this is here:
>>
>>
>>
>> http://www.nmedia.net/~andrew/tmp/CommandLinePublisher.java
>>
>>
>>
>> It connects, sends 5000 msgs, disconnects, then creates a consumer and
>> subscribes.
>>
>>
>>
>> It ends with
>>
>>
>>
>> received #791 msg text='sent msg #4993'
>>
>> received #792 msg text='sent msg #4994'
>>
>> received #793 msg text='sent msg #4995'
>>
>> received #794 msg text='sent msg #4996'
>>
>> received #795 msg text='sent msg #4997'
>>
>> received #796 msg text='sent msg #4998'
>>
>> received #797 msg text='sent msg #4999'
>>
>> Any ideas what's wrong here?
>>
>> Thanks,
>>
>> Andrew
>>
>>
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/retroactive-consumer-still-dropping-msgs...-tp16451630s2354p16470573.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: retroactive consumer still dropping msgs...
Posted by liushk <li...@qq.com>.
it looks like you need "acknowledge" the received messages
Andrew M-2 wrote:
>
> My retroactive consumer is still only saving the most recent 797 messages.
> The complete code for an app demonstrating this is here:
>
>
>
> http://www.nmedia.net/~andrew/tmp/CommandLinePublisher.java
>
>
>
> It connects, sends 5000 msgs, disconnects, then creates a consumer and
> subscribes.
>
>
>
> It ends with
>
>
>
> received #791 msg text='sent msg #4993'
>
> received #792 msg text='sent msg #4994'
>
> received #793 msg text='sent msg #4995'
>
> received #794 msg text='sent msg #4996'
>
> received #795 msg text='sent msg #4997'
>
> received #796 msg text='sent msg #4998'
>
> received #797 msg text='sent msg #4999'
>
> Any ideas what's wrong here?
>
> Thanks,
>
> Andrew
>
>
>
>
>
--
View this message in context: http://www.nabble.com/retroactive-consumer-still-dropping-msgs...-tp16451630s2354p16456889.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.