Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11125

camel-reactive-streams - Consumer should allow to not refill so frequently

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Implemented
    • Affects Version/s: 2.19.0
    • Fix Version/s: 2.20.0
    • Component/s: camel-reactive-streams
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Every time a consumer has completed onNext it calculates a refill, and because it has completed 1 message, it will always ask for at least 1 message.

      This happens even if there is 127 messages already in the buffer.

      We should probably have some way of having a low/high watermark so if the buffer has many messages already we dont need to refill so frequently.

      This happens in the code: org.apache.camel.component.reactive.streams.engine.CamelSubscriber#onNext

      By having those watermark threshold we allow to not be so chatty and request data all the time, but instead request data in more bulks. Otherwise chances are that we just keep requesting = 1 all the time.

        Attachments

          Activity

            People

            • Assignee:
              nferraro Nicola Ferraro
              Reporter:
              davsclaus Claus Ibsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: