public void testABandBCbrokerNetworkWithSelectors() throws Exception {
  bridgeBrokers("BrokerA","BrokerB",dynamicOnly,2,true);
  bridgeBrokers("BrokerB","BrokerC",dynamicOnly,2,true);
  startAllBrokers();
  Destination dest=createDestination("TEST.FOO",true);
  MessageConsumer clientA=createConsumer("BrokerC",dest,"dummy = 33");
  MessageConsumer clientB=createConsumer("BrokerC",dest,"dummy > 30");
  MessageConsumer clientC=createConsumer("BrokerC",dest,"dummy = 34");
  Thread.sleep(2000);
  HashMap<String,Object> props=new HashMap<>();
  props.put("dummy",33);
  sendMessages("BrokerA",dest,MESSAGE_COUNT,props);
  props.put("dummy",34);
  sendMessages("BrokerA",dest,MESSAGE_COUNT * 2,props);
  MessageIdList msgsA=getConsumerMessages("BrokerC",clientA);
  MessageIdList msgsB=getConsumerMessages("BrokerC",clientB);
  MessageIdList msgsC=getConsumerMessages("BrokerC",clientC);
  msgsA.waitForMessagesToArrive(MESSAGE_COUNT);
  msgsB.waitForMessagesToArrive(MESSAGE_COUNT * 3);
  msgsC.waitForMessagesToArrive(MESSAGE_COUNT * 2);
  assertEquals(MESSAGE_COUNT,msgsA.getMessageCount());
  assertEquals(MESSAGE_COUNT * 3,msgsB.getMessageCount());
  assertEquals(MESSAGE_COUNT * 2,msgsC.getMessageCount());
}

public void testABandBCbrokerNetworkWithSelectors ( ) throws Exception { bridgeBrokers ( "BrokerA" , "BrokerB" , dynamicOnly , 2 , true ) ; bridgeBrokers ( "BrokerB" , "BrokerC" , dynamicOnly , 2 , true ) ; startAllBrokers ( ) ; Destination dest = createDestination ( "TEST.FOO" , true ) ; MessageConsumer clientA = createConsumer ( "BrokerC" , dest , "dummy = 33" ) ; MessageConsumer clientB = createConsumer ( "BrokerC" , dest , "dummy > 30" ) ; MessageConsumer clientC = createConsumer ( "BrokerC" , dest , "dummy = 34" ) ; Thread . sleep ( 2000 ) ; HashMap < String , Object > props = new HashMap < > ( ) ; props . put ( "dummy" , 33 ) ; sendMessages ( "BrokerA" , dest , MESSAGE_COUNT , props ) ; props . put ( "dummy" , 34 ) ; sendMessages ( "BrokerA" , dest , MESSAGE_COUNT * 2 , props ) ; MessageIdList msgsA = getConsumerMessages ( "BrokerC" , clientA ) ; MessageIdList msgsB = getConsumerMessages ( "BrokerC" , clientB ) ; MessageIdList msgsC = getConsumerMessages ( "BrokerC" , clientC ) ; msgsA . waitForMessagesToArrive ( MESSAGE_COUNT ) ; msgsB . waitForMessagesToArrive ( MESSAGE_COUNT * 3 ) ; msgsC . waitForMessagesToArrive ( MESSAGE_COUNT * 2 ) ; assertEquals ( MESSAGE_COUNT , msgsA . getMessageCount ( ) ) ; assertEquals ( MESSAGE_COUNT * 3 , msgsB . getMessageCount ( ) ) ; assertEquals ( MESSAGE_COUNT * 2 , msgsC . getMessageCount ( ) ) ; }
brokera - > brokerb - > brokerc
