use of io.smallrye.reactive.messaging.kafka.base.KafkaMapBasedConfig in project smallrye-reactive-messaging by smallrye.
the class BatchConsumerTest method testIncomingConsumingListPayload.
@Test
void testIncomingConsumingListPayload() {
KafkaMapBasedConfig config = kafkaConfig("mp.messaging.incoming.kafka").put("value.deserializer", StringDeserializer.class.getName()).put("auto.offset.reset", "earliest").put("topic", topic).put("batch", true);
BeanConsumingListPayload bean = runApplication(config, BeanConsumingListPayload.class);
companion.produceStrings().usingGenerator(i -> new ProducerRecord<>(topic, null, "v-" + i), 10);
await().until(() -> bean.messages().size() == 10);
assertThat(bean.messages()).hasSize(10).allSatisfy(p -> assertThat(p).startsWith("v-"));
}
Aggregations