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

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