You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jliezers <jo...@metoffice.gov.uk> on 2013/03/25 11:14:39 UTC

AMQ_SCHEDULER_ACTION_BROWSE returns incomplete list

I'm making good use of the ActiveMQ 5.6 scheduled message feature.

schedulerSupport="true" and my complete scheduled message list appears as
expected on the "Scheduled" page when I view usings the ActiveMQ admin
console.

I need to browse the list to delete messages so I've written some java code
that makes use of the AMQ_SCHEDULER_ACTION_BROWSE property.

This works OK but does not retrieve the complete scheduled message list.
Older scheduled messages are not returned at all but recent (last 24 hours)
submitted scheduled messages are returned correctly.

At first I thought messages were somehow being cached in memory so I
restarted ActiveMQ but I still just get back the recent messages created
today but not those visible on the admin console that were created a few
days before.

I have not yet determined the cut off point at which the messages are no
longer browsable.

Is the underlying KahaDb setup doing something odd?





--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-SCHEDULER-ACTION-BROWSE-returns-incomplete-list-tp4665093.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ_SCHEDULER_ACTION_BROWSE returns incomplete list

Posted by Timothy Bish <ta...@gmail.com>.
On 03/28/2013 11:36 AM, Christian Posta wrote:
> Yah, unless Tim or Gary know off hand why this is, I would say open a JIRA.
> I am not seeing any logic in the code that would filter out messages for a
> browse based on TTL.
>
> It would be great if you could throw together a little unit test that shows
> this and I can take a closer look. Take a look at this test for an example
> of a unit test:
>
> http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java?view=markup
A test case would be good.

The TTL should only be applied for the Message once its scheduled send 
time arrives such that the newly sent scheduled message will time out 
like any other message.  Scheduled tasks should "time out" based on 
their own scheduling criteria and not the TTL of the Message.
>
> On Thu, Mar 28, 2013 at 2:46 AM, jliezers <jo...@metoffice.gov.uk>wrote:
>
>> I can confirm that the deafult 3 hour expiration (timeToLive) value applied
>> to all messages by my template was causing the problem.
>>
>> If I override and set expiration = 0 for the scheduled messages then they
>> are browsable.
>>
>> Is there a JIRA required here?
>>
>> Should ActiveMQ schedule browse action disregard expiration and not filter
>> out expired messages when browsing the scheduled message list?
>>
>> Should scheduled messages always have expiration set to zero?
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/AMQ-SCHEDULER-ACTION-BROWSE-returns-incomplete-list-tp4665093p4665247.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>
>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: AMQ_SCHEDULER_ACTION_BROWSE returns incomplete list

Posted by Christian Posta <ch...@gmail.com>.
Yah, unless Tim or Gary know off hand why this is, I would say open a JIRA.
I am not seeing any logic in the code that would filter out messages for a
browse based on TTL.

It would be great if you could throw together a little unit test that shows
this and I can take a closer look. Take a look at this test for an example
of a unit test:

http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java?view=markup


On Thu, Mar 28, 2013 at 2:46 AM, jliezers <jo...@metoffice.gov.uk>wrote:

> I can confirm that the deafult 3 hour expiration (timeToLive) value applied
> to all messages by my template was causing the problem.
>
> If I override and set expiration = 0 for the scheduled messages then they
> are browsable.
>
> Is there a JIRA required here?
>
> Should ActiveMQ schedule browse action disregard expiration and not filter
> out expired messages when browsing the scheduled message list?
>
> Should scheduled messages always have expiration set to zero?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/AMQ-SCHEDULER-ACTION-BROWSE-returns-incomplete-list-tp4665093p4665247.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: AMQ_SCHEDULER_ACTION_BROWSE returns incomplete list

Posted by jliezers <jo...@metoffice.gov.uk>.
I can confirm that the deafult 3 hour expiration (timeToLive) value applied
to all messages by my template was causing the problem. 

If I override and set expiration = 0 for the scheduled messages then they
are browsable.

Is there a JIRA required here?

Should ActiveMQ schedule browse action disregard expiration and not filter
out expired messages when browsing the scheduled message list?

Should scheduled messages always have expiration set to zero?



--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-SCHEDULER-ACTION-BROWSE-returns-incomplete-list-tp4665093p4665247.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ_SCHEDULER_ACTION_BROWSE returns incomplete list

Posted by Christian Posta <ch...@gmail.com>.
Maybe you can open a JIRA?


On Mon, Mar 25, 2013 at 6:31 AM, jliezers <jo...@metoffice.gov.uk>wrote:

> Might have the answer.
>
> I'm pretty sure my scheduled messages are (incorrectly) being submitted
> using a SpringJMSTemplate where timeToLive= 3 hours.
>
> 3 hours after submission they are no longer browsable using
> AMQ_SCHEDULER_ACTION_BROWSE but they remain visible on the admin console
> scheduled messages page and still behave correctly as scheduled messages.
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/AMQ-SCHEDULER-ACTION-BROWSE-returns-incomplete-list-tp4665093p4665103.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: AMQ_SCHEDULER_ACTION_BROWSE returns incomplete list

Posted by jliezers <jo...@metoffice.gov.uk>.
Might have the answer.

I'm pretty sure my scheduled messages are (incorrectly) being submitted
using a SpringJMSTemplate where timeToLive= 3 hours. 

3 hours after submission they are no longer browsable using
AMQ_SCHEDULER_ACTION_BROWSE but they remain visible on the admin console
scheduled messages page and still behave correctly as scheduled messages.




--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-SCHEDULER-ACTION-BROWSE-returns-incomplete-list-tp4665093p4665103.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.