Liking cljdoc? Tell your friends :D

kafka-async.producer


closeclj

(close producer-id)

Closes a Kafka producer and the respective core-async channel given the producer id obtained in create!.

Returns nil if there is no producer with the given id or a sequence of all producers otherwise

Closes a Kafka producer and the respective core-async channel given the producer id obtained in `create!`.

Returns `nil` if there is no producer with the given id or a sequence of all producers otherwise
sourceraw docstring

create!clj

(create! servers client-id)
(create! servers client-id buffer-size options)

Creates a Kafka Producer client with a core.async interface given the broker's list and group id.

After the Java Kafka producer is created it's saved in the producers atom with the following format:

{:uuid {:chan core-async-input-channel :producer java-kafka-producer}}

A core.async process is created that reads from the input channel and sends the event to Java Kafka Producer. If a nil event is passed the process ends.

This function returns the following map to the client

{:chan in-chan :id producer-id}
Creates a Kafka Producer client with a core.async interface given the broker's list and group id.

After the Java Kafka producer is created it's saved in the `producers` atom with the following format:

```clojure
{:uuid {:chan core-async-input-channel :producer java-kafka-producer}}
```

A core.async process is created that reads from the input channel and sends the event to Java Kafka Producer.
If a nil event is passed the process ends.

This function returns the following map to the client

```clojure
{:chan in-chan :id producer-id}
```
sourceraw docstring

default-in-chan-sizeclj

Producer core.async input channel default buffer size

Producer core.async input channel default buffer size
sourceraw docstring

producer-defaultsclj

source

producersclj

CLojure atom containing all the registered producers in Kafka-Async

CLojure `atom` containing all the registered producers in Kafka-Async
sourceraw docstring

to-producer-recordclj

(to-producer-record {topic :topic hash-key :key event :event})

Converts a map into a Kafka Producer Record. The map contains the following structure

{:topic "some-topic" :hash-key "some-hash" :event {...}}
Converts a map into a Kafka Producer Record. The map contains the following structure

```clojure
{:topic "some-topic" :hash-key "some-hash" :event {...}}
```
sourceraw docstring

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

× close