java - How the consume can notify the JMS queue to hold the message -


my scenario is, listen queue. if message posted, consume , forward app.

is possible when finding app is down, can notify queue, in way, hold message don't message. when app come back, notify queue can process message again.

it seems "client_acknowledge" mode doesn't on situation.

help in regard appreciated. in advance.

in general, have 2 possibilities:

  1. just stop consuming messages. in case, messages stay in queue until resume processing.
  2. generate queue channel , send stop/start messages on queue producer of messages. can regarded implementation of backpressure.

imho, 1. should sufficient in cases. 2. necessary, if amount of messages generated leads large resource (memory/disk) consumption want avoid. still use combination of two, e.g. if app down more time, notify producer.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -