Search in sources :

Example 1 with VirtualTopic

use of org.apache.activemq.broker.region.virtual.VirtualTopic in project activemq-artemis by apache.

the class SingleBrokerVirtualDestinationsWithWildcardTest method createAndConfigureBroker.

private BrokerService createAndConfigureBroker(URI uri) throws Exception {
    BrokerService broker = createBroker(uri);
    configurePersistenceAdapter(broker);
    // make all topics virtual and consumers use the default prefix
    VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
    virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[] { new VirtualTopic() });
    DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[] { virtualDestinationInterceptor };
    broker.setDestinationInterceptors(destinationInterceptors);
    return broker;
}
Also used : VirtualTopic(org.apache.activemq.broker.region.virtual.VirtualTopic) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor) DestinationInterceptor(org.apache.activemq.broker.region.DestinationInterceptor) BrokerService(org.apache.activemq.broker.BrokerService) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor)

Example 2 with VirtualTopic

use of org.apache.activemq.broker.region.virtual.VirtualTopic in project activemq-artemis by apache.

the class TwoBrokerVirtualDestDinamicallyIncludedDestTest method createAndConfigureBroker.

private BrokerService createAndConfigureBroker(URI uri) throws Exception {
    BrokerService broker = createBroker(uri);
    configurePersistenceAdapter(broker);
    // make all topics virtual and consumers use the default prefix
    VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
    VirtualTopic vTopic = new VirtualTopic();
    vTopic.setLocal(true);
    virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[] { vTopic });
    DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[] { virtualDestinationInterceptor };
    broker.setDestinationInterceptors(destinationInterceptors);
    return broker;
}
Also used : VirtualTopic(org.apache.activemq.broker.region.virtual.VirtualTopic) DestinationInterceptor(org.apache.activemq.broker.region.DestinationInterceptor) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor) BrokerService(org.apache.activemq.broker.BrokerService) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor)

Example 3 with VirtualTopic

use of org.apache.activemq.broker.region.virtual.VirtualTopic in project activemq-artemis by apache.

the class AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport method createAndConfigureBroker.

private BrokerService createAndConfigureBroker(URI uri) throws Exception {
    BrokerService broker = createBroker(uri);
    configurePersistenceAdapter(broker);
    // make all topics virtual and consumers use the default prefix
    VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
    virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[] { new VirtualTopic() });
    DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[] { virtualDestinationInterceptor };
    broker.setDestinationInterceptors(destinationInterceptors);
    return broker;
}
Also used : VirtualTopic(org.apache.activemq.broker.region.virtual.VirtualTopic) DestinationInterceptor(org.apache.activemq.broker.region.DestinationInterceptor) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor) BrokerService(org.apache.activemq.broker.BrokerService) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor)

Example 4 with VirtualTopic

use of org.apache.activemq.broker.region.virtual.VirtualTopic in project activemq-artemis by apache.

the class ThreeBrokerVirtualTopicNetworkTest method createAndConfigureBroker.

private BrokerService createAndConfigureBroker(URI uri) throws Exception {
    BrokerService broker = createBroker(uri);
    configurePersistenceAdapter(broker);
    // make all topics virtual and consumers use the default prefix
    VirtualDestinationInterceptor virtualDestinationInterceptor = new VirtualDestinationInterceptor();
    virtualDestinationInterceptor.setVirtualDestinations(new VirtualDestination[] { new VirtualTopic() });
    DestinationInterceptor[] destinationInterceptors = new DestinationInterceptor[] { virtualDestinationInterceptor };
    broker.setDestinationInterceptors(destinationInterceptors);
    return broker;
}
Also used : VirtualTopic(org.apache.activemq.broker.region.virtual.VirtualTopic) DestinationInterceptor(org.apache.activemq.broker.region.DestinationInterceptor) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor) BrokerService(org.apache.activemq.broker.BrokerService) VirtualDestinationInterceptor(org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor)

Aggregations

BrokerService (org.apache.activemq.broker.BrokerService)4 DestinationInterceptor (org.apache.activemq.broker.region.DestinationInterceptor)4 VirtualDestinationInterceptor (org.apache.activemq.broker.region.virtual.VirtualDestinationInterceptor)4 VirtualTopic (org.apache.activemq.broker.region.virtual.VirtualTopic)4