Search in sources :

Example 11 with EnvironmentBuilder

use of com.rabbitmq.stream.EnvironmentBuilder in project rabbitmq-stream-java-client by rabbitmq.

the class StreamProducerTest method init.

@BeforeEach
void init() {
    EnvironmentBuilder environmentBuilder = Environment.builder().eventLoopGroup(eventLoopGroup).recoveryBackOffDelayPolicy(BackOffDelayPolicy.fixed(Duration.ofSeconds(2))).topologyUpdateBackOffDelayPolicy(BackOffDelayPolicy.fixed(Duration.ofSeconds(2)));
    environmentBuilder.addressResolver(add -> localhost());
    environment = environmentBuilder.build();
}
Also used : EnvironmentBuilder(com.rabbitmq.stream.EnvironmentBuilder) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 12 with EnvironmentBuilder

use of com.rabbitmq.stream.EnvironmentBuilder in project rabbitmq-stream-java-client by rabbitmq.

the class SuperStreamProducerTest method init.

@BeforeEach
void init(TestInfo info) throws Exception {
    EnvironmentBuilder environmentBuilder = Environment.builder().eventLoopGroup(eventLoopGroup);
    environmentBuilder.addressResolver(add -> localhost());
    environment = environmentBuilder.build();
    connection = new ConnectionFactory().newConnection();
    superStream = TestUtils.streamName(info);
}
Also used : EnvironmentBuilder(com.rabbitmq.stream.EnvironmentBuilder) ConnectionFactory(com.rabbitmq.client.ConnectionFactory) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

EnvironmentBuilder (com.rabbitmq.stream.EnvironmentBuilder)12 BeforeEach (org.junit.jupiter.api.BeforeEach)6 Test (org.junit.jupiter.api.Test)5 ConnectionFactory (com.rabbitmq.client.ConnectionFactory)3 Address (com.rabbitmq.stream.Address)2 ChannelCustomizer (com.rabbitmq.stream.ChannelCustomizer)2 ConfirmationHandler (com.rabbitmq.stream.ConfirmationHandler)2 Constants (com.rabbitmq.stream.Constants)2 Consumer (com.rabbitmq.stream.Consumer)2 ConsumerBuilder (com.rabbitmq.stream.ConsumerBuilder)2 Environment (com.rabbitmq.stream.Environment)2 OffsetSpecification (com.rabbitmq.stream.OffsetSpecification)2 Producer (com.rabbitmq.stream.Producer)2 ProducerBuilder (com.rabbitmq.stream.ProducerBuilder)2 StreamCreator (com.rabbitmq.stream.StreamCreator)2 StreamException (com.rabbitmq.stream.StreamException)2 SslHandler (io.netty.handler.ssl.SslHandler)2 RateLimiter (com.google.common.util.concurrent.RateLimiter)1 AddressResolver (com.rabbitmq.stream.AddressResolver)1 AuthenticationFailureException (com.rabbitmq.stream.AuthenticationFailureException)1