0
// #atLeastOnceBatch
        Consumer.Control control =
            Consumer.committableSource(consumerSettings, Subscriptions.topics("topic1"))
                .mapAsync(1, msg ->
                    business(msg.record().key(), msg.record().value())
                            .thenApply(done -> msg.committableOffset())
                )
                .batch(
                    20,
                    ConsumerMessage::createCommittableOffsetBatch,
                    ConsumerMessage.CommittableOffsetBatch::updated
                )
                .mapAsync(3, c -> c.commitJavadsl())
                .to(Sink.ignore())
                .run(materializer);
        // #atLeastOnceBatch

I'm trying to test drive the Alpakka Kafka Connnector at least once batch example and I'm getting the following compile time errors

The type ConsumerMessage does not define createCommittableOffsetBatch(ConsumerMessage.CommittableOffset) that is applicable here

and The type ConsumerMessage.CommittableOffsetBatch does not define updated(S, ConsumerMessage.CommittableOffset) that is applicable here

1 Answers1

0

These are available in v 0.22. Unfortunately the documentation of Alpakka lacks a bit compared to Akka Docs.

JVXR
  • 1,294
  • 1
  • 11
  • 20