public void testVirtualDestinationsDinamicallyIncludedBehavior2() throws Exception {
  startAllBrokers();
  Destination dest=createDestination("global.test",true);
  MessageConsumer clientB2=createConsumer("BrokerB",createDestination("Consumer.foo-bar.global.test",false));
  Thread.sleep(2 * 1000);
  sendMessages("BrokerA",dest,MESSAGE_COUNT);
  MessageIdList msgsB2=getConsumerMessages("BrokerB",clientB2);
  msgsB2.waitForMessagesToArrive(MESSAGE_COUNT);
  assertEquals(MESSAGE_COUNT,msgsB2.getMessageCount());
}

public void testVirtualDestinationsDinamicallyIncludedBehavior2 ( ) throws Exception { startAllBrokers ( ) ; Destination dest = createDestination ( "global.test" , true ) ; MessageConsumer clientB2 = createConsumer ( "BrokerB" , createDestination ( "Consumer.foo-bar.global.test" , false ) ) ; Thread . sleep ( 2 * 1000 ) ; sendMessages ( "BrokerA" , dest , MESSAGE_COUNT ) ; MessageIdList msgsB2 = getConsumerMessages ( "BrokerB" , clientB2 ) ; msgsB2 . waitForMessagesToArrive ( MESSAGE_COUNT ) ; assertEquals ( MESSAGE_COUNT , msgsB2 . getMessageCount ( ) ) ; }
brokera - > brokerb & & brokerb - > brokera
