2

I have never configured activemq, I just use the totally default configuration in TomEE Plus 1.7.1 and it works perfectly. I use JMS for asynchron e-mail sending. Now I would like to use the scheduler support, like this:

...
message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY,
    delayMinute * 60000);
...

But message is not delayed. I read that schedulerSupport should have been turned on in an xml file (probably activemq.xml (?)) but I don't have such a file.

I tried this in tomee.xml, but it does not work:

<Resource id="myActiveMQResourceAdapter" type="ActiveMQResourceAdapter">
    schedulerSupport = true
</Resource>

Where should I put the schedulerSupport = true configuration property? I don't want to declare new Broker's or any other things. Just I would like to use the default settings plus scheduler support.

GregTom
  • 352
  • 4
  • 15

1 Answers1

7

Scheduler support is disabled by default in ActiveMQ. In order to use it you must set the property 'schedulerSupport' to true which means you will need to modify the default broker configuration, no way around that.

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" schedulerSupport="true">
Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • Thank you this answer but in TomEE another configuration syntax must be used. Solution is here: http://stackoverflow.com/questions/31190176/failed-to-configure-custom-activemq-broker-in-tomee – GregTom Jul 03 '15 at 12:42