Skip to main content Link Search Menu Expand Document (external link)

Producer overview

Added in v0.2.0


Table of contents


accessors

send

Signature

export declare const send: (
  record: Producer.ProducerRecord
) => Effect.Effect<Producer.RecordMetadata[], never, Producer>

Added in v0.2.0

sendScoped

Signature

export declare const sendScoped: (
  record: Producer.ProducerRecord
) => Effect.Effect<Producer.RecordMetadata[], Error.ConnectionException, KafkaInstance.KafkaInstance | Scope.Scope>

Added in v0.4.0

constructors

Producer

Signature

export declare const Producer: Context.Tag<Producer, Producer>

Added in v0.1.0

make

Signature

export declare const make: (options: internal.ProducerConstructorProps) => Producer

Added in v0.2.0

makeProducer

Signature

export declare const makeProducer: (
  options?: Producer.ProducerOptions
) => Effect.Effect<Producer, Error.ConnectionException, KafkaInstance.KafkaInstance | Scope.Scope>

Added in v0.2.0

layers

layer

Signature

export declare const layer: (
  options?: Producer.ProducerOptions
) => Layer.Layer<Producer, Error.ConnectionException, KafkaInstance.KafkaInstance>

Added in v0.2.0

models

Producer (interface)

Signature

export interface Producer extends internal.ProducerConstructorProps {
  readonly [TypeId]: TypeId
}

Added in v0.1.0

producer options

currentProducerOptions

Signature

export declare const currentProducerOptions: FiberRef.FiberRef<KafkaJS.ProducerConfig>

Added in v0.2.0

setProducerOptions

Signature

export declare const setProducerOptions: (config: Producer.ProducerOptions) => Layer.Layer<never>

Added in v0.2.0

withProducerOptions

Signature

export declare const withProducerOptions: {
  (config: Producer.ProducerOptions): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>
  <A, E, R>(effect: Effect.Effect<A, E, R>, config: Producer.ProducerOptions): Effect.Effect<A, E, R>
}

Added in v0.2.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v0.1.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v0.1.0

utils

Producer (namespace)

Added in v0.2.0

ProducerBatch (type alias)

Signature

export type ProducerBatch = KafkaJS.ProducerBatch

Added in v0.2.0

ProducerOptions (type alias)

Signature

export type ProducerOptions = KafkaJS.ProducerConfig

Added in v0.2.0

ProducerRecord (type alias)

Signature

export type ProducerRecord = KafkaJS.ProducerRecord

Added in v0.2.0

RecordMetadata (type alias)

Signature

export type RecordMetadata = KafkaJS.RecordMetadata

Added in v0.2.0