You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by shoab alam <sh...@gmail.com> on 2013/12/02 14:36:29 UTC
ScheduledMessage.AMQ_SCHEDULED_CRON and
ScheduledMessage.AMQ_SCHEDULED_ID
Can we use message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON,"51
18 * * ?"); and this
essage.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_ID,"Some Unique
ID"); simultaneously.???
when i use only
message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON,"51 18 * *
?"); i get the messages on schedule but the AMQ_SCHEDULED_ID on it are NULL.
and when i use both simultaneously as below the messages are delivered as
soon as they are scheduled with the AMQ_SCHEDULED_ID :-
jmsTemplate.send(new MessageCreator() {
@Override
public Message createMessage(Session session) throws JMSException {
TextMessage message = session.createTextMessage();
message.setText("Message for"+msgId);
message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON, "51
18 * * ?");
message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_ID,"Some Unique
ID");
return message;
}
});
I need the Unique ID on each message as i shall remove some of them in
future and replace them with new messages.
Please Help!!!!
--
View this message in context: http://activemq.2283324.n4.nabble.com/ScheduledMessage-AMQ-SCHEDULED-CRON-and-ScheduledMessage-AMQ-SCHEDULED-ID-tp4674987.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: ScheduledMessage.AMQ_SCHEDULED_CRON and ScheduledMessage.AMQ_SCHEDULED_ID
Posted by Timothy Bish <ta...@gmail.com>.
On 12/02/2013 08:36 AM, shoab alam wrote:
> Can we use message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON,"51
> 18 * * ?"); and this
> essage.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_ID,"Some Unique
> ID"); simultaneously.???
>
> when i use only
> message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON,"51 18 * *
> ?"); i get the messages on schedule but the AMQ_SCHEDULED_ID on it are NULL.
>
> and when i use both simultaneously as below the messages are delivered as
> soon as they are scheduled with the AMQ_SCHEDULED_ID :-
>
> jmsTemplate.send(new MessageCreator() {
> @Override
> public Message createMessage(Session session) throws JMSException {
> TextMessage message = session.createTextMessage();
> message.setText("Message for"+msgId);
> message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON, "51
> 18 * * ?");
> message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_ID,"Some Unique
> ID");
> return message;
> }
> });
>
> I need the Unique ID on each message as i shall remove some of them in
> future and replace them with new messages.
>
> Please Help!!!!
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ScheduledMessage-AMQ-SCHEDULED-CRON-and-ScheduledMessage-AMQ-SCHEDULED-ID-tp4674987.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
Seems like there could be a bug there, best to create a unit test and
attach it to a Jira issue for investigation.
--
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/