Skip to content

Commit

Permalink
consumer decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
idantavor committed Jul 25, 2024
1 parent ac90ed2 commit f734328
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ Note: `int` is used for brevity but can also mean `long`. Don't worry about it.
| :internal-config | map | optional | A map of the underlying java client properties, for any extra lower level config |

#### Consumer-source options
| Key | Type | Req? | Notes |
|-------------|-----------------------------------------------------------------------------------------------|------------|---------------------------------------------------------------------------------------|
| :group-id | string | required | |
| :shape | `:value:`, `[:vector <fields>]`,`[:map <fields>]`, or an arity-1 function of `ConsumerRecord` | optional | If unspecified, channel will contain ConsumerRecord objects. [Examples](#data-shapes) |
| :ketu.source/consumer-commands-chan | channel | optional | Used for passing custom functions to be executed from within the poll loop. Items of this channel are expected to be of type `fn[x]`. One example for using this channel is to enable pausing/resuming of the underlying kafka consumer, since trying to do that outside the poll loop causes a `ConcurrentModificationException` to be thrown. [Example](#example-of-using-the-custom-commands-channel) |
| Key | Type | Req? | Notes |
|---------------------------------|-----------------------------------------------------------------------------------------------|------------|---------------------------------------------------------------------------------------|
| :group-id | string | required | |
| :shape | `:value:`, `[:vector <fields>]`,`[:map <fields>]`, or an arity-1 function of `ConsumerRecord` | optional | If unspecified, channel will contain ConsumerRecord objects. [Examples](#data-shapes) |
| :ketu.source/consumer-decorator | fucntion | optional | ..... |


#### Producer-sink options
Expand Down
3 changes: 1 addition & 2 deletions src/ketu/spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@
:ketu.source/consumer-thread-timeout-ms
:ketu.source/close-out-chan?
:ketu.source/close-consumer?
:ketu.source/consumer-commands-chan
:ketu.source/consumer-interceptors]))
:ketu.source/consumer-decorator]))

(s/def :ketu.apache.producer/config map?)
(s/def :ketu.sink/sender-threads-num pos-int?)
Expand Down

0 comments on commit f734328

Please sign in to comment.