[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Client failover redeliveries discussion
clebert.suconic@jboss.com
do-not-reply at jboss.com
Wed Oct 18 10:23:03 EDT 2006
"ovidiu.feodorov at jboss.com" wrote :
| Clebert wrote :
| | Basically what I do on failover is to create a new consumer on the new server, replace IDs and re-register the Callback handler. The server at this point will think it's a new client coming. In case of durable subscribers/queues and persistent messages you will have the queue refilled
| |
|
| Could you explain in a little bit more detail how this works? You detect the failure at remoting level, and then, what happens? Do you preserve the Connection/Session/Consumer hierarchy on the client? How do you create the corresponding endpoint hierarchy on the fail-over ServerPeer?
|
At this point I'm not detecting the failure at remoting level yet.
There is a method called failover on ClientConnectionDelegate:
class ClientConnectionDelegate:
| public void failOver(ConnectionDelegate newConnection)
|
That method is implemented as an aspect into ConnectionAspect::handleFailover.
handleFailover will navigate over the state hierarchy described at http://wiki.jboss.org/wiki/Wiki.jsp?page=NewMessagingHADesign, and it will create another ServerSide object for each instance found on the hierarchy.
Every time a new serverObject is created, the client object ID is swaped by the new created object, and the remotingConnection instance is swaped by the connection passed as a parameter. This way, all the failed delegates will take place on the new server.
"Ovidiu" wrote : Before having a conference call, I think a better idea is to summarize what you've implemented so far. Describe how the fail-over happens step by step.
I will work with some testcases today, and update the design document. After that we will be ready for a conference about this. This thread has provided the discussion I needed already.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979092#3979092
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979092
More information about the jboss-dev-forums
mailing list