Search in sources :

Example 6 with BrokerAddresses

use of com.meltwater.rxrabbit.BrokerAddresses in project rxrabbit by meltwater.

the class ExampleAppsTest method setup.

@Before
public void setup() throws Exception {
    killAndRestartRabbitDocker();
    prop = new Properties();
    prop.load(ExampleAppsTest.class.getResourceAsStream("/test.properties"));
    prop.putAll(System.getProperties());
    addresses = new BrokerAddresses(prop.getProperty("rabbit.broker.uris"));
    channelFactory = new DefaultChannelFactory(addresses, new ConnectionSettings());
    RabbitTestUtils.createQueues(channelFactory, prop.getProperty("in.queue"), new Exchange(prop.getProperty("in.exchange")));
    RabbitTestUtils.createQueues(channelFactory, prop.getProperty("out.queue"), new Exchange(prop.getProperty("out.exchange")));
}
Also used : DefaultChannelFactory(com.meltwater.rxrabbit.impl.DefaultChannelFactory) Exchange(com.meltwater.rxrabbit.Exchange) Properties(java.util.Properties) ConnectionSettings(com.meltwater.rxrabbit.ConnectionSettings) BrokerAddresses(com.meltwater.rxrabbit.BrokerAddresses) Before(org.junit.Before)

Aggregations

BrokerAddresses (com.meltwater.rxrabbit.BrokerAddresses)6 ConnectionSettings (com.meltwater.rxrabbit.ConnectionSettings)5 Exchange (com.meltwater.rxrabbit.Exchange)5 Properties (java.util.Properties)4 DefaultChannelFactory (com.meltwater.rxrabbit.impl.DefaultChannelFactory)3 DefaultPublisherFactory (com.meltwater.rxrabbit.DefaultPublisherFactory)2 Payload (com.meltwater.rxrabbit.Payload)2 PublisherSettings (com.meltwater.rxrabbit.PublisherSettings)2 RabbitPublisher (com.meltwater.rxrabbit.RabbitPublisher)2 RoutingKey (com.meltwater.rxrabbit.RoutingKey)2 Logger (com.meltwater.rxrabbit.util.Logger)2 AMQP (com.rabbitmq.client.AMQP)2 IOException (java.io.IOException)2 Charsets (com.google.common.base.Charsets)1 Lists (com.google.common.collect.Lists)1 AdminChannel (com.meltwater.rxrabbit.AdminChannel)1 ChannelFactory (com.meltwater.rxrabbit.ChannelFactory)1 ConsumerSettings (com.meltwater.rxrabbit.ConsumerSettings)1 DefaultConsumerFactory (com.meltwater.rxrabbit.DefaultConsumerFactory)1 DeliveryMode (com.meltwater.rxrabbit.DeliveryMode)1