0
votes

There is a situation where I need to have a suspend kind of behavior on my Active MQ JMS inbound endpoint when my output endpoint is down. So that I don't process the messages from the queue. Once Then output endpoint is up I want to resume the queue fetching operations. Is this possible in Mule? If yes how ?

1

1 Answers

1
votes

You should be able to do something like this:

Connector connector = muleRegistry.lookupConnector(connectorName); 
connector.stop(); 

However, this is not really a straight forward solution if you care about message loss. There will be some time before the connector goes down and the very message at hand, which triggered this "stop" might be lost, if you don't handle those cases with care.

There is another option. Say your other resource is down just for some small amount of time,, you might want to just use JMS transactions and roll back the message to the queue (which it will be when the output endpoint fails) then it will retry the transaction over and over.