Mrityunjoy Roy created AMQ-4783:
-----------------------------------
Summary: Scheduled messages lost if broker is shut down during the
scheduled time of the message
Key: AMQ-4783
URL: https://issues.apache.org/jira/browse/AMQ-4783
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 5.8.0
Reporter: Mrityunjoy Roy
a. Send a scheduled message to broker , let us say to deliver in 60 sec
b. Immediately shut down the broker and keep it down for 60 seconds (down
at the time the message is scheduled to deliver)
On coming up , the message is not queued .
When the broker starts , it adds listeners to it’s store
2013-04-18 19:35:42,184 INFO Broker starter
activemq.broker.BrokerService:633 - Apache ActiveMQ 5.8.0 (authorizerBroker,
ID:Joycomp-4951-1366328140528-1:1) is starting
2013-04-18 19:35:42,199 DEBUG Broker starter
kahadb.scheduler.JobSchedulerImpl:82 - Joy - Adding job listener
2013-04-18 19:35:42,215 DEBUG Broker starter
kahadb.scheduler.JobSchedulerImpl:85 - Joy - Added Listener is scheduler broker
After that when message’s scheduld time comes , it fires the message to queue
as below -:
2013-04-18 19:37:41,012 DEBUG JobScheduler:JMS
kahadb.scheduler.JobSchedulerImpl:442 - Firing Job
[id=ID:Joycomp-4951-1366328140528-5:1:1:1:1, startTime=Thu Apr 18 19:37:36 EDT
2013, delay=5000, period=0, repeat=0, nextTime=Thu Apr 18 19:37:41 EDT 2013]
2013-04-18 19:37:41,012 DEBUG JobScheduler:JMS
kahadb.scheduler.JobSchedulerImpl:445 - byte sequnce =
org.apache.activemq.util.ByteSequence@f0c67
2013-04-18 19:37:41,012 DEBUG JobScheduler:JMS
kahadb.scheduler.JobSchedulerImpl:446 - Job listeners list=1
Now , for my case , on a restart , if it finds that a message’s scheduled time
is past the time of start of the broker , during the initialization it fires
the message even before the broker is started
2013-04-18 19:40:57,387 INFO Broker starter kahadb.plist.PListStoreImpl:331 -
PListStore:[C:\Joy\servers\tomcat\7.0.37\dist\bin\activemq-data\authorizerBroker\tmp_storage]
started
2013-04-18 19:40:58,356 DEBUG JobScheduler:JMS
kahadb.scheduler.JobSchedulerImpl:445 - byte sequnce =
org.apache.activemq.util.ByteSequence@10ee5b8
2013-04-18 19:40:58,356 DEBUG JobScheduler:JMS
kahadb.scheduler.JobSchedulerImpl:446 - Job listeners list=0
// Broker started later -:
2013-04-18 19:40:59,199 INFO Broker starter activemq.broker.BrokerService:633
- Apache ActiveMQ 5.8.0 (authorizerBroker, ID:Joycomp-1494-1366328458231-1:1)
is starting
2013-04-18 19:40:59,246 DEBUG Broker starter
kahadb.scheduler.JobSchedulerImpl:82 - Joy - Adding job listener
2013-04-18 19:40:59,246 DEBUG Broker starter
kahadb.scheduler.JobSchedulerImpl:85 - Joy - Added Listener is scheduler broker
--
This message was sent by Atlassian JIRA
(v6.1#6144)