logging - Configuring Message Listener Container -


i have below configuration sets "messagereader" pojo class process incoming messages. working fine configured, since not have lot of experience spring integration, have basic questions on happening underneath , if can monitored.

  1. i not able find documentation on how underlying message listener container poll queue messages. missing something? if understand below configuration correctly, default use "defaultmessagelistenercontainer". see class extends abstractpollingmessagelistenerconainer. see receivetimeout, don't see specifying polling interval. there such setting? seems pretty instantaneous when test configured see below. our needs not aggresive; fine queue being polled every 30 seconds or so.
  2. is there way (perhaps log4j setting) can log when container wakes , looks messages on queue (even if none found)? our sustainment team wants able verify process "running" when no messages being sent. in other words, want way of troubleshooting if container may have become hung. tool of ruling out hung thread in case messages believed have been sent, not having seen them received.

i realize may have configure container instead of accepting defaults have below, i'm fine if can accomplish above things??

<int:channel id="inboundchannel" />  <jms:message-driven-channel-adapter    connection-factory="myconnectionfactory"    destination="queue" channel="inboundchannel" />  <int:service-activator input-channel="inboundchannel">   <bean class="com.myapp.messagereader" /> </int:service-activator>    

the container message-driven - has thread (or threads) blocked in provider's client library waiting new message arrive - it's not polling queue, it's polling client. receive timeout (default 5 seconds) container can react stop() (otherwise thread blocked in client no way interrupt - depending on client's implementation).

if turn on trace debugging, you'll see activity - please remember not mean there round trip broker each time, it's asking client if new message has arrived broker.

when container creates consumer, broker knows , send messages directly - there's no polling of queue per se.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -