franz

package franz

Type members

Classlikes

final case class BatchedStream(topic: Subscription, consumerSettings: ConsumerSettings, batchSize: Int, batchLimit: FiniteDuration, keyDeserializer: Deserializer[Any, DynamicJson], valueDeserializer: Deserializer[Any, DynamicJson], blockOnCommit: Boolean)
Companion:
object

A Kafka stream which will batch up records by the least of either a time-window or max-size, and then use the provided 'persist' function on each batch

A Kafka stream which will batch up records by the least of either a time-window or max-size, and then use the provided 'persist' function on each batch

Companion:
class
object DataGen

Code which knows how to create test json from an avro schema

Code which knows how to create test json from an avro schema

case class DynamicJson(underlyingJson: Json) extends Dynamic

Like circe optics - pimped dynamic type on top of circe json

Like circe optics - pimped dynamic type on top of circe json

Companion:
object
Companion:
class
final case class DynamicProducer(settings: DynamicProducerSettings, kafkaProducer: Producer)

A data structure which provides convenience methods over a ZIO Kafka Producer

A data structure which provides convenience methods over a ZIO Kafka Producer

final case class DynamicProducerSettings(producerConfig: FranzConfig)
Companion:
class
final case class FranzConfig(franzConfig: Config)
Companion:
object
final case class FranzContext(_writer: DynamicProducer, _reader: BatchedStream)
Companion:
object
Companion:
class
object Recipes

Various recipes for operating on Kafka

Various recipes for operating on Kafka

object SchemaGen
final case class Seed(long: Long)
Companion:
object
object Seed
Companion:
class
Companion:
class
final case class SerdeSupport(config: FranzConfig)
Companion:
object
case class State[S, A](run: S => (A, S))
Companion:
object
object State
Companion:
class
sealed trait SupportedType[A]

This is used to be able to create a particular type from a json input.

This is used to be able to create a particular type from a json input.

It's used by the KafkaPublishService in order to shove in ProducerRecord's from user REST input

Companion:
object
Companion:
class
object implicits

Types

type CRecord = CommittableRecord[DynamicJson, DynamicJson]
type KafkaRecord = ConsumerRecord[DynamicJson, DynamicJson]
type Supported = Int | Long | DynamicJson | Json | IndexedRecord | String | ByteBuffer

Supported Kafka types (to convert to/from DynamicJson)

Supported Kafka types (to convert to/from DynamicJson)

Value members

Concrete methods

def asLocalTime(millis: Long): LocalDateTime
def runtime: Runtime[ZEnv]

Extensions

Extensions

extension (admin: AdminClient)
def countByTopic(topics: Iterable[String]): ZIO[Any, Throwable, Map[String, Long]]
def offsetsByTopic(topics: Iterable[String], spec: OffsetSpec): ZIO[Any, Throwable, Map[TopicPartition, ListOffsetsResultInfo]]
extension [E, A](app: ZIO[Scope & DynamicProducer & BatchedStream, E, A])
def run(config: FranzConfig): A

"clean up" the ability to execute a ZIO for its value using a given FranzConfig

"clean up" the ability to execute a ZIO for its value using a given FranzConfig

extension (crecord: CRecord)
extension [A](data: A)
def asAvro(namespace: String)(implicit evidence$2: Encoder[A]): GenericRecord
extension (hocon: String)
def parseAsAvro(namespace: String): GenericRecord
extension (json: Json)
extension [K, V](record: ProducerRecord[K, V])
extension [K, V](record: ConsumerRecord[K, V])
def asProducerRecord(topic: String, partition: Int): ProducerRecord[K, V]

easily be able to convert a consume record into a producer record

easily be able to convert a consume record into a producer record

Value parameters:
partition

the target partition

topic

the target topic

Returns:

a producer record

def copyWith[K2, V2](f: (K, V) => (K2, V2)): ConsumerRecord[K2, V2]

Some convenience methods on a consumer record (copy methods)

Some convenience methods on a consumer record (copy methods)

Some convenience methods on a consumer record (copy methods)

Some convenience methods on a consumer record (copy methods)

def withKey[K2](f: K => K2): ConsumerRecord[K2, V]

Some convenience methods on a consumer record (copy methods)

Some convenience methods on a consumer record (copy methods)

def withValue[V2](f: V => V2): ConsumerRecord[K, V2]

Some convenience methods on a consumer record (copy methods)

Some convenience methods on a consumer record (copy methods)

extension [A](value: A)
def asTestData(initialSeed: Seed)(implicit evidence$1: Encoder[A]): Iterator[Json]

The ability to turn any encodeable value into a sequence of test data via a postFix operation:

The ability to turn any encodeable value into a sequence of test data via a postFix operation:

 val someData : SomeData = ...
 val testData: Iterator[Json] = someData.asTestData(10)
extension [T](x: T | Null)
inline def nn: T