Backpressure Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024

ความคิดเห็น • 4

  • @LeviRamsey
    @LeviRamsey ปีที่แล้ว +4

    It doesn't matter in this example (since it's a plain Kafka source), but if you're using Kafka offset commit (aka "cumulative ack", especially if you're familiar with Pulsar), you'll want to use SelectAsync instead of SelectAsyncUnordered to preserve ordering and thus allow an at-least-once processing guarantee to be maintained.

    • @Petabridge
      @Petabridge  ปีที่แล้ว +2

      This is 100% correct.

    • @LeviRamsey
      @LeviRamsey ปีที่แล้ว +1

      @@Petabridge every time I see someone in Akka JVM do mapAsyncUnordered (how we spell SelectAsyncUnordered) with Kafka I shudder.

    • @Petabridge
      @Petabridge  ปีที่แล้ว +3

      @@LeviRamsey In my StackOverflow reply I mentioned that if ordering is important then you should use SelectAsync - if min latency / max throughput is more important, use SelectAsyncUnordered. Given that they were using a plain consumer I figured the latter.