Search in sources :

Example 1 with SubscriberBuilder

use of org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder in project smallrye-reactive-messaging by smallrye.

the class AmqpSinkTest method testSinkUsingAmqpMessageAndChannelNameProperty.

@Test
@Timeout(30)
@SuppressWarnings({ "deprecation" })
public void testSinkUsingAmqpMessageAndChannelNameProperty() throws Exception {
    int msgCount = 10;
    String topic = UUID.randomUUID().toString();
    CountDownLatch msgsReceived = new CountDownLatch(msgCount);
    List<org.apache.qpid.proton.message.Message> messagesReceived = Collections.synchronizedList(new ArrayList<>(msgCount));
    AtomicReference<String> attachAddress = new AtomicReference<>("non-null-initialisation-value");
    server = setupMockServerForTypeTest(messagesReceived, msgsReceived, attachAddress);
    SubscriberBuilder<? extends Message<?>, Void> sink = createProviderAndSinkUsingChannelName(topic, server.actualPort());
    // noinspection unchecked
    Multi.createFrom().range(0, 10).map(v -> AmqpMessage.<String>builder().withBody(HELLO + v).withSubject("foo").build()).subscribe((Subscriber<? super AmqpMessage<String>>) sink.build());
    assertThat(msgsReceived.await(6, TimeUnit.SECONDS)).isTrue();
    AtomicInteger count = new AtomicInteger();
    messagesReceived.forEach(msg -> {
        assertThat(msg.getAddress()).isEqualTo(topic);
        assertThat(msg.getSubject()).isEqualTo("foo");
        Section body = msg.getBody();
        assertThat(body).isInstanceOf(AmqpValue.class);
        Object payload = ((AmqpValue) body).getValue();
        assertThat(HELLO + count).isEqualTo(payload);
        count.incrementAndGet();
    });
    assertThat(count.get()).isEqualTo(msgCount);
    // Should have used an anonymous sender link, verify null target address
    assertThat(attachAddress.get()).isNull();
}
Also used : java.util(java.util) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) CompletableFuture(java.util.concurrent.CompletableFuture) AtomicReference(java.util.concurrent.atomic.AtomicReference) ConnectorFactory(org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory) Multi(io.smallrye.mutiny.Multi) MapBasedConfig(io.smallrye.reactive.messaging.test.common.config.MapBasedConfig) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Symbol(org.apache.qpid.proton.amqp.Symbol) AmqpValue(org.apache.qpid.proton.amqp.messaging.AmqpValue) Target(org.apache.qpid.proton.amqp.transport.Target) SmallRyeConfigProviderResolver(io.smallrye.config.SmallRyeConfigProviderResolver) JsonObject(io.vertx.core.json.JsonObject) Binary(org.apache.qpid.proton.amqp.Binary) Subscriber(org.reactivestreams.Subscriber) Weld(org.jboss.weld.environment.se.Weld) Data(org.apache.qpid.proton.amqp.messaging.Data) Awaitility.await(org.awaitility.Awaitility.await) SubscriberBuilder(org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder) WeldContainer(org.jboss.weld.environment.se.WeldContainer) Assertions.entry(org.assertj.core.api.Assertions.entry) StandardCharsets(java.nio.charset.StandardCharsets) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) JsonArray(io.vertx.core.json.JsonArray) Message(org.eclipse.microprofile.reactive.messaging.Message) AfterEach(org.junit.jupiter.api.AfterEach) Section(org.apache.qpid.proton.amqp.messaging.Section) Buffer(io.vertx.mutiny.core.buffer.Buffer) ConfigProvider(org.eclipse.microprofile.config.ConfigProvider) Accepted(org.apache.qpid.proton.amqp.messaging.Accepted) Timeout(org.junit.jupiter.api.Timeout) Message(org.eclipse.microprofile.reactive.messaging.Message) AtomicReference(java.util.concurrent.atomic.AtomicReference) CountDownLatch(java.util.concurrent.CountDownLatch) Section(org.apache.qpid.proton.amqp.messaging.Section) AmqpValue(org.apache.qpid.proton.amqp.messaging.AmqpValue) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) JsonObject(io.vertx.core.json.JsonObject) Test(org.junit.jupiter.api.Test) Timeout(org.junit.jupiter.api.Timeout)

Example 2 with SubscriberBuilder

use of org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder in project smallrye-reactive-messaging by smallrye.

the class AmqpSinkTest method testSinkUsingObjectThatCannotBeSerialized.

@Test
@Timeout(30)
public void testSinkUsingObjectThatCannotBeSerialized() throws Exception {
    int msgCount = 10;
    AtomicInteger nack = new AtomicInteger();
    CountDownLatch msgsReceived = new CountDownLatch(msgCount / 2);
    List<org.apache.qpid.proton.message.Message> messagesReceived = Collections.synchronizedList(new ArrayList<>(msgCount));
    server = setupMockServerForTypeTest(messagesReceived, msgsReceived);
    SubscriberBuilder<? extends Message<?>, Void> sink = createProviderAndSink(UUID.randomUUID().toString(), server.actualPort());
    // noinspection unchecked
    Multi.createFrom().range(0, 10).map(i -> {
        Person p;
        if (i % 2 == 0) {
            p = new Person();
            p.setName(HELLO + i);
        } else {
            p = new Bad();
            p.setName(HELLO + i);
        }
        return p;
    }).map(p -> Message.of(p, () -> CompletableFuture.completedFuture(null), e -> {
        nack.incrementAndGet();
        return CompletableFuture.completedFuture(null);
    })).subscribe((Subscriber<? super Message<Person>>) sink.build());
    assertThat(msgsReceived.await(6, TimeUnit.SECONDS)).isTrue();
    await().until(() -> nack.get() == 5);
    AtomicInteger count = new AtomicInteger();
    messagesReceived.forEach(msg -> {
        assertThat(msg.getContentType()).isEqualTo("application/json");
        Section body = msg.getBody();
        assertThat(body).isInstanceOf(Data.class);
        Binary bin = ((Data) body).getValue();
        byte[] bytes = Binary.copy(bin).getArray();
        JsonObject json = Buffer.buffer(bytes).toJsonObject();
        Person p = json.mapTo(Person.class);
        assertThat(p.getName()).startsWith("hello-");
        count.incrementAndGet();
    });
    assertThat(count.get()).isEqualTo(msgCount / 2);
    assertThat(nack).hasValue(5);
}
Also used : java.util(java.util) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) CompletableFuture(java.util.concurrent.CompletableFuture) AtomicReference(java.util.concurrent.atomic.AtomicReference) ConnectorFactory(org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory) Multi(io.smallrye.mutiny.Multi) MapBasedConfig(io.smallrye.reactive.messaging.test.common.config.MapBasedConfig) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Symbol(org.apache.qpid.proton.amqp.Symbol) AmqpValue(org.apache.qpid.proton.amqp.messaging.AmqpValue) Target(org.apache.qpid.proton.amqp.transport.Target) SmallRyeConfigProviderResolver(io.smallrye.config.SmallRyeConfigProviderResolver) JsonObject(io.vertx.core.json.JsonObject) Binary(org.apache.qpid.proton.amqp.Binary) Subscriber(org.reactivestreams.Subscriber) Weld(org.jboss.weld.environment.se.Weld) Data(org.apache.qpid.proton.amqp.messaging.Data) Awaitility.await(org.awaitility.Awaitility.await) SubscriberBuilder(org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder) WeldContainer(org.jboss.weld.environment.se.WeldContainer) Assertions.entry(org.assertj.core.api.Assertions.entry) StandardCharsets(java.nio.charset.StandardCharsets) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) JsonArray(io.vertx.core.json.JsonArray) Message(org.eclipse.microprofile.reactive.messaging.Message) AfterEach(org.junit.jupiter.api.AfterEach) Section(org.apache.qpid.proton.amqp.messaging.Section) Buffer(io.vertx.mutiny.core.buffer.Buffer) ConfigProvider(org.eclipse.microprofile.config.ConfigProvider) Accepted(org.apache.qpid.proton.amqp.messaging.Accepted) Timeout(org.junit.jupiter.api.Timeout) Message(org.eclipse.microprofile.reactive.messaging.Message) JsonObject(io.vertx.core.json.JsonObject) Data(org.apache.qpid.proton.amqp.messaging.Data) CountDownLatch(java.util.concurrent.CountDownLatch) Section(org.apache.qpid.proton.amqp.messaging.Section) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Binary(org.apache.qpid.proton.amqp.Binary) Test(org.junit.jupiter.api.Test) Timeout(org.junit.jupiter.api.Timeout)

Example 3 with SubscriberBuilder

use of org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder in project smallrye-reactive-messaging by smallrye.

the class AmqpSinkTest method testOutgoingMetadata.

@SuppressWarnings("unchecked")
@Test
@Timeout(30)
public void testOutgoingMetadata() throws Exception {
    String address = UUID.randomUUID().toString();
    int msgCount = 10;
    CountDownLatch msgsReceived = new CountDownLatch(msgCount);
    List<org.apache.qpid.proton.message.Message> messagesReceived = Collections.synchronizedList(new ArrayList<>(msgCount));
    server = setupMockServerForTypeTest(messagesReceived, msgsReceived);
    SubscriberBuilder<? extends Message<?>, Void> sink = createProviderAndSink(address, server.actualPort());
    // noinspection unchecked
    Multi.createFrom().range(0, 10).map(Message::of).map(m -> m.addMetadata(OutgoingAmqpMetadata.builder().withSubject("subject").withMessageId("my-id").withReplyTo("reply-to").withReplyToGroupId("reply-to-group").withPriority((short) 6).withTtl(2000).withGroupId("group").withContentType("text/plain").withCorrelationId("correlation-" + m.getPayload()).withUserId("user").withDeliveryAnnotations("some-delivery-annotation", "da-value").withMessageAnnotations("some-msg-annotation", "ma-value").withApplicationProperties(new JsonObject().put("key", "value")).withFooter("my-trailer", "hello-footer").build())).subscribe((Subscriber<? super Message<Integer>>) sink.build());
    assertThat(msgsReceived.await(6, TimeUnit.SECONDS)).isTrue();
    AtomicInteger count = new AtomicInteger();
    messagesReceived.forEach(msg -> {
        assertThat(msg.getAddress()).isEqualTo(address);
        assertThat(msg.getSubject()).isEqualTo("subject");
        assertThat(msg.getMessageId()).isEqualTo("my-id");
        assertThat(msg.getReplyTo()).isEqualTo("reply-to");
        assertThat(msg.getReplyToGroupId()).isEqualTo("reply-to-group");
        assertThat(msg.getPriority()).isEqualTo((short) 6);
        assertThat(msg.getTtl()).isEqualTo(2000);
        assertThat(msg.getGroupId()).isEqualTo("group");
        assertThat(msg.getContentType()).isEqualTo("text/plain");
        assertThat(msg.getCorrelationId()).isEqualTo("correlation-" + count.get());
        assertThat(msg.isFirstAcquirer()).isFalse();
        assertThat(msg.getUserId()).isEqualTo("user".getBytes(StandardCharsets.UTF_8));
        assertThat(msg.getDeliveryAnnotations()).isNotNull();
        assertThat(msg.getDeliveryAnnotations().getValue()).containsExactly(entry(Symbol.valueOf("some-delivery-annotation"), "da-value"));
        assertThat(msg.getMessageAnnotations()).isNotNull();
        assertThat(msg.getMessageAnnotations().getValue()).containsExactly(entry(Symbol.valueOf("some-msg-annotation"), "ma-value"));
        assertThat(msg.getApplicationProperties()).isNotNull();
        assertThat(msg.getApplicationProperties().getValue()).containsExactly(entry("key", "value"));
        assertThat(msg.getFooter()).isNotNull();
        // noinspection unchecked
        assertThat(msg.getFooter().getValue()).containsExactly(entry("my-trailer", "hello-footer"));
        Section body = msg.getBody();
        assertThat(body).isInstanceOf(AmqpValue.class);
        assertThat(((AmqpValue) body).getValue()).isEqualTo(count.get());
        count.incrementAndGet();
    });
    assertThat(count.get()).isEqualTo(msgCount);
}
Also used : java.util(java.util) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) CompletableFuture(java.util.concurrent.CompletableFuture) AtomicReference(java.util.concurrent.atomic.AtomicReference) ConnectorFactory(org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory) Multi(io.smallrye.mutiny.Multi) MapBasedConfig(io.smallrye.reactive.messaging.test.common.config.MapBasedConfig) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Symbol(org.apache.qpid.proton.amqp.Symbol) AmqpValue(org.apache.qpid.proton.amqp.messaging.AmqpValue) Target(org.apache.qpid.proton.amqp.transport.Target) SmallRyeConfigProviderResolver(io.smallrye.config.SmallRyeConfigProviderResolver) JsonObject(io.vertx.core.json.JsonObject) Binary(org.apache.qpid.proton.amqp.Binary) Subscriber(org.reactivestreams.Subscriber) Weld(org.jboss.weld.environment.se.Weld) Data(org.apache.qpid.proton.amqp.messaging.Data) Awaitility.await(org.awaitility.Awaitility.await) SubscriberBuilder(org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder) WeldContainer(org.jboss.weld.environment.se.WeldContainer) Assertions.entry(org.assertj.core.api.Assertions.entry) StandardCharsets(java.nio.charset.StandardCharsets) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) JsonArray(io.vertx.core.json.JsonArray) Message(org.eclipse.microprofile.reactive.messaging.Message) AfterEach(org.junit.jupiter.api.AfterEach) Section(org.apache.qpid.proton.amqp.messaging.Section) Buffer(io.vertx.mutiny.core.buffer.Buffer) ConfigProvider(org.eclipse.microprofile.config.ConfigProvider) Accepted(org.apache.qpid.proton.amqp.messaging.Accepted) Timeout(org.junit.jupiter.api.Timeout) Message(org.eclipse.microprofile.reactive.messaging.Message) JsonObject(io.vertx.core.json.JsonObject) CountDownLatch(java.util.concurrent.CountDownLatch) Section(org.apache.qpid.proton.amqp.messaging.Section) AmqpValue(org.apache.qpid.proton.amqp.messaging.AmqpValue) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Test(org.junit.jupiter.api.Test) Timeout(org.junit.jupiter.api.Timeout)

Example 4 with SubscriberBuilder

use of org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder in project smallrye-reactive-messaging by smallrye.

the class AmqpSinkTest method testOutgoingMetadataWithTtlSetOnConnector.

@SuppressWarnings("unchecked")
@Test
@Timeout(30)
public void testOutgoingMetadataWithTtlSetOnConnector() throws Exception {
    String address = UUID.randomUUID().toString();
    int msgCount = 10;
    CountDownLatch msgsReceived = new CountDownLatch(msgCount);
    List<org.apache.qpid.proton.message.Message> messagesReceived = Collections.synchronizedList(new ArrayList<>(msgCount));
    server = setupMockServerForTypeTest(messagesReceived, msgsReceived);
    SubscriberBuilder<? extends Message<?>, Void> sink = createProviderAndSinkWithConnectorTtl(address, server.actualPort(), 3000);
    // noinspection unchecked
    Multi.createFrom().range(0, 10).map(Message::of).map(m -> m.addMetadata(OutgoingAmqpMetadata.builder().withSubject("subject").withMessageId("my-id").withReplyTo("reply-to").withReplyToGroupId("reply-to-group").withPriority((short) 6).withGroupId("group").withContentType("text/plain").withCorrelationId("correlation-" + m.getPayload()).withUserId("user").withDeliveryAnnotations("some-delivery-annotation", "da-value").withMessageAnnotations("some-msg-annotation", "ma-value").withApplicationProperties(new JsonObject().put("key", "value")).withFooter("my-trailer", "hello-footer").build())).subscribe((Subscriber<? super Message<Integer>>) sink.build());
    assertThat(msgsReceived.await(6, TimeUnit.SECONDS)).isTrue();
    AtomicInteger count = new AtomicInteger();
    messagesReceived.forEach(msg -> {
        assertThat(msg.getAddress()).isEqualTo(address);
        assertThat(msg.getSubject()).isEqualTo("subject");
        assertThat(msg.getMessageId()).isEqualTo("my-id");
        assertThat(msg.getReplyTo()).isEqualTo("reply-to");
        assertThat(msg.getReplyToGroupId()).isEqualTo("reply-to-group");
        assertThat(msg.getPriority()).isEqualTo((short) 6);
        assertThat(msg.getTtl()).isEqualTo(3000);
        assertThat(msg.getGroupId()).isEqualTo("group");
        assertThat(msg.getContentType()).isEqualTo("text/plain");
        assertThat(msg.getCorrelationId()).isEqualTo("correlation-" + count.get());
        assertThat(msg.isFirstAcquirer()).isFalse();
        assertThat(msg.getUserId()).isEqualTo("user".getBytes(StandardCharsets.UTF_8));
        assertThat(msg.getDeliveryAnnotations()).isNotNull();
        assertThat(msg.getDeliveryAnnotations().getValue()).containsExactly(entry(Symbol.valueOf("some-delivery-annotation"), "da-value"));
        assertThat(msg.getMessageAnnotations()).isNotNull();
        assertThat(msg.getMessageAnnotations().getValue()).containsExactly(entry(Symbol.valueOf("some-msg-annotation"), "ma-value"));
        assertThat(msg.getApplicationProperties()).isNotNull();
        assertThat(msg.getApplicationProperties().getValue()).containsExactly(entry("key", "value"));
        assertThat(msg.getFooter()).isNotNull();
        // noinspection unchecked
        assertThat(msg.getFooter().getValue()).containsExactly(entry("my-trailer", "hello-footer"));
        Section body = msg.getBody();
        assertThat(body).isInstanceOf(AmqpValue.class);
        assertThat(((AmqpValue) body).getValue()).isEqualTo(count.get());
        count.incrementAndGet();
    });
    assertThat(count.get()).isEqualTo(msgCount);
}
Also used : java.util(java.util) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) CompletableFuture(java.util.concurrent.CompletableFuture) AtomicReference(java.util.concurrent.atomic.AtomicReference) ConnectorFactory(org.eclipse.microprofile.reactive.messaging.spi.ConnectorFactory) Multi(io.smallrye.mutiny.Multi) MapBasedConfig(io.smallrye.reactive.messaging.test.common.config.MapBasedConfig) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Symbol(org.apache.qpid.proton.amqp.Symbol) AmqpValue(org.apache.qpid.proton.amqp.messaging.AmqpValue) Target(org.apache.qpid.proton.amqp.transport.Target) SmallRyeConfigProviderResolver(io.smallrye.config.SmallRyeConfigProviderResolver) JsonObject(io.vertx.core.json.JsonObject) Binary(org.apache.qpid.proton.amqp.Binary) Subscriber(org.reactivestreams.Subscriber) Weld(org.jboss.weld.environment.se.Weld) Data(org.apache.qpid.proton.amqp.messaging.Data) Awaitility.await(org.awaitility.Awaitility.await) SubscriberBuilder(org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder) WeldContainer(org.jboss.weld.environment.se.WeldContainer) Assertions.entry(org.assertj.core.api.Assertions.entry) StandardCharsets(java.nio.charset.StandardCharsets) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) JsonArray(io.vertx.core.json.JsonArray) Message(org.eclipse.microprofile.reactive.messaging.Message) AfterEach(org.junit.jupiter.api.AfterEach) Section(org.apache.qpid.proton.amqp.messaging.Section) Buffer(io.vertx.mutiny.core.buffer.Buffer) ConfigProvider(org.eclipse.microprofile.config.ConfigProvider) Accepted(org.apache.qpid.proton.amqp.messaging.Accepted) Timeout(org.junit.jupiter.api.Timeout) Message(org.eclipse.microprofile.reactive.messaging.Message) JsonObject(io.vertx.core.json.JsonObject) CountDownLatch(java.util.concurrent.CountDownLatch) Section(org.apache.qpid.proton.amqp.messaging.Section) AmqpValue(org.apache.qpid.proton.amqp.messaging.AmqpValue) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Test(org.junit.jupiter.api.Test) Timeout(org.junit.jupiter.api.Timeout)

Example 5 with SubscriberBuilder

use of org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder in project smallrye-reactive-messaging by smallrye.

the class EventBusSinkTest method testSinkUsingInteger.

@SuppressWarnings("unchecked")
@Test
public void testSinkUsingInteger() {
    String topic = UUID.randomUUID().toString();
    AtomicInteger expected = new AtomicInteger(0);
    usage.consumeIntegers(topic, 10, 10, TimeUnit.SECONDS, v -> expected.getAndIncrement());
    Map<String, Object> config = new HashMap<>();
    config.put("address", topic);
    EventBusSink sink = new EventBusSink(vertx, new VertxEventBusConnectorOutgoingConfiguration(new MapBasedConfig(config)));
    SubscriberBuilder<? extends Message<?>, Void> subscriber = sink.sink();
    Multi.createFrom().range(0, 10).map(v -> (Message<?>) Message.of(v)).subscribe((Subscriber<Message<?>>) subscriber.build());
    await().untilAtomic(expected, is(10));
    assertThat(expected).hasValue(10);
}
Also used : Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Multi(io.smallrye.mutiny.Multi) MapBasedConfig(io.smallrye.reactive.messaging.test.common.config.MapBasedConfig) ArrayList(java.util.ArrayList) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) Is.is(org.hamcrest.core.Is.is) NoSuchElementException(java.util.NoSuchElementException) Subscriber(org.reactivestreams.Subscriber) Weld(org.jboss.weld.environment.se.Weld) Awaitility.await(org.awaitility.Awaitility.await) PersonCodec(io.smallrye.reactive.messaging.eventbus.codec.PersonCodec) SubscriberBuilder(org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder) UUID(java.util.UUID) WeldContainer(org.jboss.weld.environment.se.WeldContainer) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) List(java.util.List) Message(org.eclipse.microprofile.reactive.messaging.Message) AfterEach(org.junit.jupiter.api.AfterEach) Person(io.smallrye.reactive.messaging.eventbus.codec.Person) Collections(java.util.Collections) Message(org.eclipse.microprofile.reactive.messaging.Message) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) HashMap(java.util.HashMap) MapBasedConfig(io.smallrye.reactive.messaging.test.common.config.MapBasedConfig) Test(org.junit.jupiter.api.Test)

Aggregations

Multi (io.smallrye.mutiny.Multi)13 Message (org.eclipse.microprofile.reactive.messaging.Message)13 SubscriberBuilder (org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder)13 AtomicReference (java.util.concurrent.atomic.AtomicReference)12 MapBasedConfig (io.smallrye.reactive.messaging.test.common.config.MapBasedConfig)11 JsonObject (io.vertx.core.json.JsonObject)11 TimeUnit (java.util.concurrent.TimeUnit)11 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)11 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)11 Awaitility.await (org.awaitility.Awaitility.await)11 Weld (org.jboss.weld.environment.se.Weld)11 WeldContainer (org.jboss.weld.environment.se.WeldContainer)11 AfterEach (org.junit.jupiter.api.AfterEach)11 Test (org.junit.jupiter.api.Test)11 Subscriber (org.reactivestreams.Subscriber)11 SmallRyeConfigProviderResolver (io.smallrye.config.SmallRyeConfigProviderResolver)10 JsonArray (io.vertx.core.json.JsonArray)10 Buffer (io.vertx.mutiny.core.buffer.Buffer)10 StandardCharsets (java.nio.charset.StandardCharsets)10 java.util (java.util)10