[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
Tue Oct 24 10:25:01 EDT 2006


At this point I have changed PostOffice's signature to accept the nodeID into its signatures.

This code is sitting on my laptop only now. I won't commit this until I can test it.

public interface PostOffice extends MessagingComponent
  | {   
  |    Binding bindQueue(String condition, Queue queue) throws Exception;
  |    Binding bindQueue(int nodeID,String condition, Queue queue) throws Exception;
  |    
  | 
  |    Binding unbindQueue(String queueName) throws Throwable;
  |    Binding unbindQueue(int nodeID,String queueName) throws Throwable;
  |    
  |    /**
  |     * List the bindings that match the specified condition
  |     * @param condition
  |     * @return
  |     * @throws Exception
  |     */
  |    Collection listBindingsForCondition(String condition) throws Exception;
  |    
  |    /**
  |     * Get the binding for the specified queue name
  |     * @param queueName
  |     * @return
  |     * @throws Exception
  |     */
  |    Binding getBindingForQueueName(int nodeID, String queueName) throws Exception;
  |    Binding getBindingForQueueName(String queueName) throws Exception;
  | 
  |    /**
  |     * Route a reference.
  |     * @param ref
  |     * @param condition The message will be routed to a queue if specified condition matches the condition
  |     * of the binding
  |     * 
  |     * @param tx The transaction or null if not in the context of a transaction
  |     * @return true if ref was accepted by at least one queue
  |     * @throws Exception
  |     */
  |    boolean route(MessageReference ref, String condition, Transaction tx) throws Exception;   
  |    
  |    boolean isLocal();
  | }
  | 

And I have changed ConnectionState to also have its original nodeID, so in case of failure it will open the ConnectionDelegate with a different nodeID on the current nodeID. I will have to make some changes (like not throwing an exception if the nodeID is not the current nodeID) and I will be testing for implications on the runtime.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980388#3980388

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980388



More information about the jboss-dev-forums mailing list