Search in sources :

Example 6 with Broker

use of org.apache.activemq.apollo.broker.Broker in project fabric8 by jboss-fuse.

the class ExtendedBurnIn method startBrokers.

@Before
public void startBrokers() {
    for (int i = 0; i < 2; i++) {
        // create a broker..
        String name = "broker" + i;
        Broker broker = createBroker(name);
        ServiceControl.start(broker);
        brokers.add(broker);
        // Add a service map entry for the broker.
        ServiceDTO details = new ServiceDTO();
        details.setId(name);
        details.setVersion("1.0");
        details.setContainer("testing");
        details.setBundleName("none");
        details.setBundleVersion("1.0");
        List<String> services = Arrays.asList("stomp://localhost:" + portOfBroker(i), "mqtt://localhost:" + portOfBroker(i), "amqp://localhost:" + portOfBroker(i), "tcp://localhost:" + portOfBroker(i));
        details.setServices(services);
        serviceMap.serviceUpdated(name, details);
        println(String.format("Broker %s is exposing: %s", name, services));
    }
}
Also used : Broker(org.apache.activemq.apollo.broker.Broker) Before(org.junit.Before)

Aggregations

Broker (org.apache.activemq.apollo.broker.Broker)6 AcceptingConnectorDTO (org.apache.activemq.apollo.dto.AcceptingConnectorDTO)3 BrokerDTO (org.apache.activemq.apollo.dto.BrokerDTO)3 VirtualHostDTO (org.apache.activemq.apollo.dto.VirtualHostDTO)3 Before (org.junit.Before)3 ServiceDTO (io.fabric8.gateway.ServiceDTO)2