Liking cljdoc? Tell your friends :D
Clojure only.

ketu.decorators.consumer.protocol


ConsumerDecoratorcljprotocol

Consumer decorator provides a way to extend the consumer source functionality. The decorator runs in the context of the polling thread and allows custom control on the internal consumer instance

Consumer decorator provides a way to extend the consumer source functionality.
The decorator runs in the context of the polling thread and allows custom control on the internal consumer instance

poll!clj

(poll! this consumer-ctx poll-fn)

Decorates the internal consumer poll loop.

  • Parameters:
    • consumer-ctx: A map containing the consumer context, typically {:ketu.source/consumer consumer}.
    • poll-fn: A function with no arguments that returns an Iterable of ConsumerRecord.
  • Returns: An iterable collection of ConsumerRecord.
  • The decorator should call the poll-fn on behalf of the consumer source.
Decorates the internal consumer poll loop.
- Parameters:
  - `consumer-ctx`: A map containing the consumer context, typically {:ketu.source/consumer consumer}.
  - `poll-fn`: A function with no arguments that returns an Iterable of ConsumerRecord.
- Returns: An iterable collection of ConsumerRecord.
- The decorator should call the `poll-fn` on behalf of the consumer source.

valid?clj

(valid? this consumer-opts)

Validates the consumer options according to the decorator logic.

  • Parameters:
    • consumer-opts: A map of consumer options to be validated.
  • Returns: true if the consumer options are valid according to the decorator logic, false otherwise.
Validates the consumer options according to the decorator logic.
- Parameters:
  - `consumer-opts`: A map of consumer options to be validated.
- Returns: true if the consumer options are valid according to the decorator logic, false otherwise.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close