Skip to main content

alphaWorks  >  Forums  >  Really Small Message Broker  >  developerWorks

Is this spec or bug?    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is answered.

Permlink Replies: 4 - Pages: 1 - Last Post: Feb 23, 2009 8:19 AM Last Post By: tamamura Threads: [ Previous | Next ]
tamamura

Posts: 3
Registered: Oct 11, 2007 12:57:56 AM
Is this spec or bug?
Posted: Feb 19, 2009 05:12:38 PM
 
Click to report abuse...   Click to reply to this thread Reply
Hello Ian,
I have a testcase of unexpected message lost.
I think pubsub network between WMQ/WMB/WAS(that have a queue) can prevent lost against this case...
please give me your thought(spec of RSMB bridge or bug).

environment:
IA92SampleGUI1 - RSMB1 - RSMB2 - RSMB3 - IA92SampleGUI3

1. confirm everything works correctly(publish from IA92SampleGUI1 - subscribe by IA92SampleGUI3)
2. shutdown RSMB1 and RSMB2
3. start RSMB1
4. connect from IA92SampleGUI1 to RSMB1
5. publish from IA92SampleGUI1 to RSMB1 with QoS1
6. start RSMB2
7. all RSMB bridges become entablished
8. IA92SampleGUI3 never get this message

Wataru Tamamura
Ian.Craggs

Posts: 11
Registered: May 03, 2005 09:04:40 AM
Re: Is this spec or bug?
Posted: Feb 19, 2009 07:41:04 PM   in response to: tamamura in response to: tamamura's post
 
Click to report abuse...   Click to reply to this thread Reply
Hello,

this is not a bug as such, although the behaviour is not obvious. It can be fixed, when using version 1.0.2 or above, by turning on persistence in the brokers with bridges (make sure each broker has a different persistence directory).

When there is no persistence, each broker starts up with no subscriptions. A connection's subscriptions to the local broker are activated when the connection has completed its connection. So, when you send publish a message and the bridge has not yet connected, it hasn't yet subscribed to the local broker. When you turn on persistence, the connection's subscriptions are saved, and are active from the moment the broker starts up.

Your example has shown me that it would be better to move each connection's local subscribe action to the start of connecting, or even the start of the broker. Then this problem could be solved without the need for turning on persistence.

Ian
tamamura

Posts: 3
Registered: Oct 11, 2007 12:57:56 AM
Re: Is this spec or bug?
Posted: Feb 22, 2009 05:00:11 AM   in response to: Ian.Craggs in response to: Ian.Craggs's post
 
Click to report abuse...   Click to reply to this thread Reply
Hello Ian,
thanks for your support.

If this behavior is changed in future release, the difference between current version(w/ persistence) and future one(w/o persistence) become clear under such case. Is that right?
1. configuration completed but bridge connections are not established yet
2. start RSMB3 and connect from IA92SampleGUI3
3. start RSMB1 and connect from IA92SampleGUI1
4. publish from IA92SampleGUI1 to RSMB1 with QoS1
5. start RSMB2
6. all RSMB bridges become entablished
7a. current version - msg not delivered because there is no subscription on RSMB1
7b. future version - msg will be delivered because there is subscription on RSMB1 at publication time(and also on RSMB2)

btw in Windows environment, "doubleclick broker.exe" and "run broker.exe within command prompt" shows different behavior
(first one doesn't create persistence files after exe shutdown)
pls let me confirm whether this is expected behavior or not.

Ian.Craggs

Posts: 11
Registered: May 03, 2005 09:04:40 AM
Re: Is this spec or bug?
Posted: Feb 22, 2009 04:29:43 PM   in response to: tamamura in response to: tamamura's post
 
Click to report abuse...   Click to reply to this thread Reply
That would be the purpose of the change, yes, to make outgoing subscriptions for the bridge active right from the start of the broker rather than the start of the connection. I would like to make sure I've thought through all the consequences of making such a change before implementing it. For instance, it would create an asymmetry between "outgoing" and "incoming" subscriptions, which can only be made once the connection has been established. The persistence solution retains the symmetry.

The "double-click broker.exe" method of invocation on windows created persistence files when I just tried it. The only difference between the two methods of invocation should be the "current directory", where the broker looks for the default configuration file. If the current directory is different to the one you expect, the broker might pick up a different configuration file or none at all, and persistence may not be configured, or the persistence files may be put into a directory you did not expect.

Ian Craggs
tamamura

Posts: 3
Registered: Oct 11, 2007 12:57:56 AM
Re: Is this spec or bug?
Posted: Feb 23, 2009 08:19:59 AM   in response to: Ian.Craggs in response to: Ian.Craggs's post
 
Click to report abuse...   Click to reply to this thread Reply
I see. thanks for your answer.

Point your RSS reader here for a feed of the latest messages in all forums