Examples of route()


Examples of org.hornetq.core.postoffice.impl.BindingsImpl.route()

      for (int i = 0; i < 100; i++)
      {
         if (route)
         {
            bind.route(new ServerMessageImpl(i, 100), new RoutingContextImpl(new FakeTransaction()));
         }
         else
         {
            bind.redistribute(new ServerMessageImpl(i, 100), queue, new RoutingContextImpl(new FakeTransaction()));
         }
View Full Code Here

Examples of org.jboss.messaging.core.contract.PostOffice.route()

       //Now route to condition2

       msg = CoreMessageFactory.createCoreMessage(2, persistentMessage, null);;     
       ref = ms.reference(msg);        

       routed = office2.route(ref, new SimpleCondition("condition2"), null);        
       assertTrue(routed.getResult());
       //Messages are sent asych so may take some finite time to arrive
       Thread.sleep(3000);

       for (int i = 0; i < 16; i++)
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.ClusteredPostOffice.route()

         this.checkEmpty(receiver4);
         checkContainsAndAcknowledge(msg, receiver5, queue5);
        
         msg = CoreMessageFactory.createCoreMessage(1, persistentMessage, null);     
         ref = ms.reference(msg);        
         routed = office6.route(ref, new SimpleCondition("queue1"), null);        
         assertTrue(routed);
        
         //The actual queue that receives the mesage is determined by the routing policy
         //The default uses round robin for the nodes (this is tested more thoroughly in
         //its own test)
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.PostOffice.route()

         assertTrue(queue4.isActive());     
        
         Message msg1 = CoreMessageFactory.createCoreMessage(1);     
         MessageReference ref1 = ms.reference(msg1);
        
         boolean routed = postOffice.route(ref1, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
        
         List msgs = receiver1.getMessages();
         assertNotNull(msgs);
         assertTrue(msgs.isEmpty());
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.PostOffice.route()

         receiver3.clear();
                    
         Message msg2 = CoreMessageFactory.createCoreMessage(2);     
         MessageReference ref2 = ms.reference(msg2);
        
         routed = postOffice.route(ref2, new SimpleCondition("topic2"), null);     
         assertTrue(routed);
        
         msgs = receiver1.getMessages();
         assertNotNull(msgs);
         assertTrue(msgs.isEmpty());
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.PostOffice.route()

  
         Message msg1 = CoreMessageFactory.createCoreMessage(1);     
         MessageReference ref1 = ms.reference(msg1);
        
         boolean routed =
            postOffice.route(ref1, new SimpleCondition("this won't match anything"), null);
        
         assertFalse(routed);
              
         List msgs = receiver1.getMessages();
         assertNotNull(msgs);
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.PostOffice.route()

         SimpleReceiver receiver3 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);
         queue3.add(receiver3);
        
         Message msg1 = CoreMessageFactory.createCoreMessage(1);     
         MessageReference ref1 = ms.reference(msg1);        
         boolean routed = postOffice.route(ref1, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
         Message msg2 = CoreMessageFactory.createCoreMessage(2);     
         MessageReference ref2 = ms.reference(msg2);        
         routed = postOffice.route(ref2, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.PostOffice.route()

         MessageReference ref1 = ms.reference(msg1);        
         boolean routed = postOffice.route(ref1, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
         Message msg2 = CoreMessageFactory.createCoreMessage(2);     
         MessageReference ref2 = ms.reference(msg2);        
         routed = postOffice.route(ref2, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
         Message msg3 = CoreMessageFactory.createCoreMessage(3);     
         MessageReference ref3 = ms.reference(msg3);        
         routed = postOffice.route(ref3, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.PostOffice.route()

         MessageReference ref2 = ms.reference(msg2);        
         routed = postOffice.route(ref2, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
         Message msg3 = CoreMessageFactory.createCoreMessage(3);     
         MessageReference ref3 = ms.reference(msg3);        
         routed = postOffice.route(ref3, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
        
         List msgs = receiver1.getMessages();
         assertNotNull(msgs);
         assertEquals(1, msgs.size());
View Full Code Here

Examples of org.jboss.messaging.core.plugin.contract.PostOffice.route()

         assertTrue(queue6.isActive());
        
         Message msg1 = CoreMessageFactory.createCoreMessage(1, persistentMessage, null);     
         MessageReference ref1 = ms.reference(msg1);
        
         boolean routed = postOffice.route(ref1, new SimpleCondition("topic1"), null);     
         assertTrue(routed);
        
         List msgs = receiver1.getMessages();
         assertNotNull(msgs);
         assertEquals(1, msgs.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.