user1406196
user1406196

Reputation: 147

How to clean jms queue from spring jms?

How to clean jms queue from spring jms? Like "clean" command from MQ Explorer? Or I should recieve messages until them end?

Upvotes: 2

Views: 1707

Answers (1)

Petter Nordlander
Petter Nordlander

Reputation: 22279

You cannot issue a clean command easily from JMS, since that requires the full MQI api. As you say, a good way is to read all messages one by one and discard them. You even get the choice to do this when clearing a queue in MQ explorer as well

Upvotes: 3

Related Questions