Skip to main content

alphaWorks  >  Forums  >  Really Small Message Broker  >  developerWorks

Messages getting lost when RSMB bridge to Websphere Message Broker (WMB)    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: 2 - Pages: 1 - Last Post: Mar 30, 2009 10:47 PM Last Post By: vtsujith Threads: [ Previous | Next ]
vtsujith

Posts: 2
Registered: Oct 07, 2007 07:13:35 PM
Messages getting lost when RSMB bridge to Websphere Message Broker (WMB)
Posted: Mar 28, 2009 09:39:01 AM
 
Click to report abuse...   Click to reply to this thread Reply
Hi Ian,

I am using RSMB with Websphere Message Broker (WMB) and Websphere Application Server (WAS). The bidirectional message flow is as follow
1. mqtt C client --> RSMB --> WMB --> WAS
2. WAS --> WMB --> RSMB --> mqtt C client

I am using the SCADAInput/SCADAOutput(Publication) nodes in WMB to bridge the connection with RSMB. Every thing works fine for me in the 1st flow (mqtt C client --> WAS)

I found it difficult to prevent message loss in the 2nd flow (WAS ---> mqtt C client).

In my environment setup, RSMB is bridged to Message broker with subscription to a unique topic. If I use the QoS as 1 or 2, WMB is persisting the messages in a database when the RSMB becomes unavailable due to some unexpected failure (I killed the RSMB process to test it). But when RSMB is brought back, the messages are not getting delivered to RSMB. I believe this happens because when RSMB reconnects the bridge its always connecting with a clean state set to true and this forces WMB to discard the stored messages.

The retained message is getting delivered, but what I am losing is the messages published with QoS 1 and 2.

When I tested the same scenario, without RSMB
i.e WAS --> WMB --> mqtt C client, there was no message loss when mqtt C client was connecting with clean state set to false.

Could you please help me to solve this issue.
Are we doing this wrong? Is there any other way that we should be using RSMB with WMB to prevent this message loss.
Are there any configurations in the RSMB, to instruct it to bridge the connection with WMB with clean state set to false. Or are there any other settings to achieve this.

My broker.cfg for your reference:

port 1882
max_inflight_messages 10
max_queued_messages 40
persistence true
retained_persistence true
bind_address 127.0.0.1
trace_level 20
connection 100
addresses 192.168.0.197:1883 192.168.0.197:8500
notifications false
try_private false
keepalive_interval 900
topic 9823104 both

Thanks,
Sujith Vellat
Ian.Craggs

Posts: 11
Registered: May 03, 2005 09:04:40 AM
Re: Messages getting lost when RSMB bridge to Websphere Message Broker (WMB)
Posted: Mar 29, 2009 05:30:06 PM   in response to: vtsujith in response to: vtsujith's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

if you have two or more addresses defined in the address list of the connection, then it connects clean-session as you have found out. I did this because if the connection switches to the other address, then it is not predictable whether any state will be shared between the server(s) on the two addresses.

If you only have one address for the connection, then the connection will be non-cleansession and thus the state will not be cleaned up on connect. This seemed a sensible and minimalist approach, but I have considered allowing an override "cleansession" parameter on the connection.

It would be good to have a some idea of the use cases for multiple addresses on a connection. If non-cleansession were used, the addresses at the other end could share state, or have separate state. Then another setting would be needed to indicate this (and there would be more work for me to implement separate state for each address).

Ian
vtsujith

Posts: 2
Registered: Oct 07, 2007 07:13:35 PM
Re: Messages getting lost when RSMB bridge to Websphere Message Broker (WMB)
Posted: Mar 30, 2009 10:47:49 PM   in response to: Ian.Craggs in response to: Ian.Craggs's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi Ian,

It will be great if you could allow an override 'cleansession' parameter on connection.
I was always trying with atleast two addresses. With only one address I could reconnect with the non-clean session.

I am using the 'clone broker' feature in the Websphere Message Broker for high availability.
i.e I have two brokers, broker 1 and broker2 where broker2 is a clone of broker1.
The second address(broker2) I am using as a failover to the first address, which has all the subscriptions
cloned (shared) from the broker at first address.

Other than for high availability, another usecase for multiple addresses will be load balancing,
for example with broker collectives in WMB.
For usecases where addresses having multiple states at other end, I believe the support you are providing with multiple connections may be used in those cases.

Thanks,
Sujith

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