Liking cljdoc? Tell your friends :D

franzy.serialization.serializers

Implementations of core Apache Kafka and Franzy serializers. For more serializers, see Franzy docs.

Implementations of core Apache Kafka and Franzy serializers.
For more serializers, see Franzy docs.
raw docstring

byte-array-serializerclj

(byte-array-serializer)

Kafka raw byte array serializer. Useful for value serialization.

Kafka raw byte array serializer.
Useful for value serialization.
sourceraw docstring

debug-serializerclj

(debug-serializer logging-fn serializer)

Simple debug serializer that wraps your serializer and desired logging function. The logging function should take at least a single arity. The function will receive a map of state information with the following possible keys, which you may choose to destructure accordingly:

  • :serializer - An instance of the serializer itself
  • :fn - Keyword name of the function being logged. Possible values [:configure :serialize :close]
  • :configs - Optional, present when configuring serializer, and only applicable for certain types of serializers
  • :is-key - Optional, present when configuring the serializer, and only applicable for certain types of serializers
  • :topic The topic being serialized, when calling serialize.
  • :data The data being serialized, when calling serialize.

Example usage:

(debug-serializer (fn [{:keys [fn serializer configs is-key topic data] :as m}] (timbre/debug "full debug map:" m) (when data (timbre/info "data:" data))) (edn-serializer))

Simple debug serializer that wraps your serializer and desired logging function.
The logging function should take at least a single arity.
The function will receive a map of state information with the following possible keys, which you may choose to destructure accordingly:

* :serializer - An instance of the serializer itself
* :fn - Keyword name of the function being logged. Possible values `[:configure :serialize :close]`
* :configs - Optional, present when configuring serializer, and only applicable for certain types of serializers
* :is-key - Optional, present when configuring the serializer, and only applicable for certain types of serializers
* :topic The topic being serialized, when calling serialize.
* :data The data being serialized, when calling serialize.

Example usage:

`(debug-serializer
        (fn [{:keys [fn serializer configs is-key topic data] :as m}]
          (timbre/debug "full debug map:" m)
          (when data
            (timbre/info "data:" data)))
          (edn-serializer))`
sourceraw docstring

edn-serializerclj

(edn-serializer)
(edn-serializer opts)
source

integer-serializerclj

(integer-serializer)

Kafka integer serializer. Useful for key serialization.

Kafka integer serializer.
Useful for key serialization.
sourceraw docstring

keyword-serializerclj

(keyword-serializer)

A serializer that serializers string values as keywords. Useful for key serializers.

A serializer that serializers string values as keywords.
Useful for key serializers.
sourceraw docstring

long-serializerclj

(long-serializer)

Kafka long serializer. Useful for key serialization.

Kafka long serializer.
Useful for key serialization.
sourceraw docstring

serializerclj

(serializer serializer-fn)
(serializer serializer-fn configure-fn close-fn)
source

simple-edn-serializerclj

(simple-edn-serializer)

A simple EDN deserializer for small amounts of data for Kafka. Useful for value serialization.

A simple EDN deserializer for small amounts of data for Kafka.
Useful for value serialization.
sourceraw docstring

string-serializerclj

(string-serializer)

Kafka string serializer. This serializer allows serializing values without a key.

Kafka string serializer.
This serializer allows serializing values without a key.
sourceraw docstring

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

× close