I dont think current time etc is part of the JMS spec and hence it would be an extension to ActiveMQ to have support for that.
What type is the delay stored as on the JMS message? Is it a java.util.Date, or some other type?
I have the control over the type of this variable. I already tried with java.util.Date and Long.
In the last tests we've done here, we tried using the Camel's Simple date formatter ($) the way below, but we keep receiving an warning and the consumer doesn't work.
We're implementing this kind of control to avoid the instant comsumption of the message. We have a monitor that verifies if some of the previous processments were completed, because they run in background. Our goal here is to set up the structure of the monitor, increasing the time between the verifications during a fixed number of attempts.
Please let us know if there is an other way to achieve this.
<from uri="activemq:REGISTRO_ATENDIMENTO_QUEUE?selector=operationName IN ('DesfazerCancelamento','AtivarLinha', 'TrocarNumero', 'DesbloquearContrato', 'CancelarContrato','SuspenderContrato','ReativarContrato','Provisionar') AND delay < $" />
2012-10-09 18:17:00,421 | WARN | ENDIMENTO_QUEUE] | faultJmsMessageListenerContainer | 143 - org.springframework.jms - 3.0.7.RELEASE | Setup of JMS message listener invoker failed for destination 'REGISTRO_ATENDIMENTO_QUEUE' - trying to recover. Cause: operationName IN ('DesfazerCancelamento','AtivarLinha', 'TrocarNumero', 'DesbloquearContrato', 'CancelarContrato','SuspenderContrato','ReativarContrato','Provisionar') AND delay < $