camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garrydias <>
Subject Re: Howto use delay message brokerage in a Camel Route using AMQ_SCHEDULED_DELAY
Date Thu, 20 Dec 2012 07:04:02 GMT
I found the problem. Is something between Eclipse and Maven Plugin

When I ran /mvn clean install -e/ my test cases were executed by Maven

My testCases has a Thread.sleep(10000) at the last line. Sometimes, I did
not wait these 10 seconds and I killed Maven process through the red square
in Eclipse console view. When I did that, the process was killed within
Eclipse but not in Windows (7) OS. Through Windows Task Manager I could see
a "java" process running for every time I ran /mvn clean install -e/. And
each process was an activemq consumer. When I killed one of these "zombie"
process the consumer amount was decreased in the activemq web console.

So, before discover this, I had at least dozens of java processes running a
single activemq consumer for *activemq:destination* and each process was
represented by different versions of my program. Weird things could have
happened, like the exception I had posted before.

When I killed all java proccess via Task Manager my application consumed
scheduled messages succesffuly... 

However, now scheduled messages (using AMQ_SCHEDULED_CRON) are succesfully
consumed... but once. In Activemq Web Console (/Scheduled/ menu) the field
/next scheduled time/ shows the next date to consume the message but when
the current time matches with this field, the message is not consumed but
/next scheduled time/ is recalculated.

- I used this cron for tests: *1,2,3,4,5,6,7,8 * * * **;
- I started my app at 4:00AM;
- 4:01AM the message WAS consumed and /next scheduled time/ was recalculated
to 4:02AM
- 4:02AM the message WAS NOT consumed and /next scheduled time/ was
recalculated to 4:03AM
- 4:03AM the message WAS NOT consumed and /next scheduled time/ was
recalculated to 4:04AM
and so on...

After 4:08AM the /next scheduled time/ was recalculated to 5:01AM. Normal
behavior! Except for the failure in consumption.

Consume the first scheduling is a normal behavior for AMQ scheduled

Thanx again

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message