Re: [javagroups-users] How to ensure notifications get sent from a short lived program (CLI)
Brought to you by:
belaban
From: Rob T. <rt...@ya...> - 2008-09-17 13:04:01
|
I have debugged this further. It seems that the problem is somehow below the layer of the channel queue. In put in code to my finalizer to see what state the underlying queue is in when the CLI is exiting. The queue is always empty and the stats of the channel always seem to be the same no matter whether the notifications were sent/received or not. For example, in this case the notifications were sent as expected: 17 Sep 2008 14:50:46,040 INFO JavaGroups queue dump: empty 17 Sep 2008 14:50:46,041 INFO JavaGroups stats: {UNICAST={num_unacked_msgs=0, num_msgs_in_recv_windows=0, num_bytes_sent=0, num_xmit_requests_received=0, num_acks_sent=1, num_msgs_sent=2, num_acks_received=2, num_msgs_received=1, num_bytes_received=0, unacked_msgs=W.X.Y.Z:33622: 0 msgs (0 to retransmit): [] And in this invocation they were not sent. Note that the stats are exactly the same: 17 Sep 2008 14:51:09,092 INFO JavaGroups queue dump: empty 17 Sep 2008 14:51:09,094 INFO JavaGroups stats: {UNICAST={num_unacked_msgs=0, num_msgs_in_recv_windows=0, num_bytes_sent=0, num_xmit_requests_received=0, num_acks_sent=1, num_msgs_sent=2, num_acks_received=2, num_msgs_received=1, num_bytes_received=0, unacked_msgs=W.X.Y.Z:33622: 0 msgs (0 to retransmit): [] So, I am thinking the problem is something down at the transport layer since the channel and queue seem to be reporting they are done transmitting the notifications. Thoughts? Rob Tulloh mailto:rt...@ya... ----- Original Message ---- From: Rob Tulloh <rt...@ya...> To: jav...@li... Sent: Tuesday, September 16, 2008 4:00:10 PM Subject: [javagroups-users] How to ensure notifications get sent from a short lived program (CLI) Hi there, I am using JGroups 2.6.3. I have a command tool that runs, updates a value (in a DB) which in turn causes a cache flush by key value to be triggered. The problem is that the CLI exits and the jgroups messages is not delivered. I am looking for the proper way for a short lived program to run and ensure that all it's messages are delivered prior to exit. I am using NotificationBus with a JChannel channel. I have tried doing things like: JChannel jc = (JChannel) bus.getChannel(); jc.disconnect() jc.closeMessageQueue(true); This does not seem to have the desired effect. Help? Thank you, Rob Tulloh mailto:rt...@ya... |