Search in sources :

Example 1 with KafkaBootstrapServers

use of io.smallrye.reactive.messaging.kafka.companion.test.KafkaBrokerExtension.KafkaBootstrapServers in project smallrye-reactive-messaging by smallrye.

the class KafkaClientReactiveStreamsPublisherTest method init.

@BeforeAll
public static void init(@KafkaBootstrapServers String bootstrapServers) {
    companion = new KafkaCompanion(bootstrapServers);
    String newTopic = "tck-" + UUID.randomUUID();
    companion.topics().createAndWait(newTopic, partitions);
    topic = newTopic;
    vertx = Vertx.vertx();
    companion.produceStrings().usingGenerator(i -> new ProducerRecord<>(topic, Integer.toString(i % partitions), Integer.toString(i)), MESSAGE_COUNT).awaitCompletion(Duration.ofSeconds(30));
}
Also used : ProducerRecord(org.apache.kafka.clients.producer.ProducerRecord) HashMap(java.util.HashMap) Multi(io.smallrye.mutiny.Multi) MapBasedConfig(io.smallrye.reactive.messaging.test.common.config.MapBasedConfig) AfterAll(org.junit.jupiter.api.AfterAll) StringDeserializer(org.apache.kafka.common.serialization.StringDeserializer) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) PublisherVerification(org.reactivestreams.tck.junit5.PublisherVerification) BeforeAll(org.junit.jupiter.api.BeforeAll) KafkaBootstrapServers(io.smallrye.reactive.messaging.kafka.companion.test.KafkaBrokerExtension.KafkaBootstrapServers) Duration(java.time.Duration) Map(java.util.Map) KafkaBrokerExtension(io.smallrye.reactive.messaging.kafka.companion.test.KafkaBrokerExtension) CountKafkaCdiEvents(io.smallrye.reactive.messaging.kafka.CountKafkaCdiEvents) Tuple2(io.smallrye.mutiny.tuples.Tuple2) Publisher(org.reactivestreams.Publisher) ConsumerConfig(org.apache.kafka.clients.consumer.ConsumerConfig) UUID(java.util.UUID) UnsatisfiedInstance(io.smallrye.reactive.messaging.kafka.base.UnsatisfiedInstance) AfterEach(org.junit.jupiter.api.AfterEach) KafkaCompanion(io.smallrye.reactive.messaging.kafka.companion.KafkaCompanion) TestEnvironment(org.reactivestreams.tck.TestEnvironment) Vertx(io.vertx.mutiny.core.Vertx) KafkaConnectorIncomingConfiguration(io.smallrye.reactive.messaging.kafka.KafkaConnectorIncomingConfiguration) KafkaSource(io.smallrye.reactive.messaging.kafka.impl.KafkaSource) IncomingKafkaRecord(io.smallrye.reactive.messaging.kafka.IncomingKafkaRecord) ProducerRecord(org.apache.kafka.clients.producer.ProducerRecord) KafkaCompanion(io.smallrye.reactive.messaging.kafka.companion.KafkaCompanion) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

Multi (io.smallrye.mutiny.Multi)1 Tuple2 (io.smallrye.mutiny.tuples.Tuple2)1 CountKafkaCdiEvents (io.smallrye.reactive.messaging.kafka.CountKafkaCdiEvents)1 IncomingKafkaRecord (io.smallrye.reactive.messaging.kafka.IncomingKafkaRecord)1 KafkaConnectorIncomingConfiguration (io.smallrye.reactive.messaging.kafka.KafkaConnectorIncomingConfiguration)1 UnsatisfiedInstance (io.smallrye.reactive.messaging.kafka.base.UnsatisfiedInstance)1 KafkaCompanion (io.smallrye.reactive.messaging.kafka.companion.KafkaCompanion)1 KafkaBrokerExtension (io.smallrye.reactive.messaging.kafka.companion.test.KafkaBrokerExtension)1 KafkaBootstrapServers (io.smallrye.reactive.messaging.kafka.companion.test.KafkaBrokerExtension.KafkaBootstrapServers)1 KafkaSource (io.smallrye.reactive.messaging.kafka.impl.KafkaSource)1 MapBasedConfig (io.smallrye.reactive.messaging.test.common.config.MapBasedConfig)1 Vertx (io.vertx.mutiny.core.Vertx)1 Duration (java.time.Duration)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 UUID (java.util.UUID)1 ConsumerConfig (org.apache.kafka.clients.consumer.ConsumerConfig)1 ProducerRecord (org.apache.kafka.clients.producer.ProducerRecord)1 StringDeserializer (org.apache.kafka.common.serialization.StringDeserializer)1 AfterAll (org.junit.jupiter.api.AfterAll)1