jcb
jcb

Reputation: 195

Is there a way to have an initial delay for a Spring JMS Listener when connecting to an Active MQ Queue?

I have a Spring JMS application that connects to an Active MQ broker when it starts up. What I would like to know is if there is a way to set an initial delay for when the JMS application will start consuming from the queue when initialized.

We are using Spring 4.1.2.RELEASE, and we are using Active MQ 5.8

Thanks,

Juan

Upvotes: 2

Views: 1747

Answers (1)

Gary Russell
Gary Russell

Reputation: 174729

Set autoStartup to false on the listener container and call start() whenever you want to start receiving messages.

Upvotes: 4

Related Questions