Module

Yoga.Kafka.Producer

Package
purescript-yoga-kafka
Repository
rowtype-yoga/purescript-yoga-kafka

#Producer Source

#ProducerOptionsImpl Source

type ProducerOptionsImpl :: Row Typetype ProducerOptionsImpl = (allowAutoTopicCreation :: Boolean, transactionTimeout :: Milliseconds)

#createProducerImpl Source

#createProducer Source

createProducer :: forall opts opts_. Union opts opts_ ProducerOptionsImpl => Record opts -> Kafka -> Effect Producer

#ProducerMessageOptionsImpl Source

type ProducerMessageOptionsImpl :: Row Typetype ProducerMessageOptionsImpl = (headers :: Object HeaderValue, key :: Key, partition :: PartitionId, timestamp :: Timestamp)

#RecordMetadata Source

type RecordMetadata = { errorCode :: ErrorCode, offset :: Nullable Offset, partition :: PartitionId, timestamp :: Nullable Timestamp, topicName :: TopicName }

#SendRecordImpl Source

#sendImpl Source

sendImpl :: forall opts msg. EffectFn2 Producer { messages :: Array { value :: Value | msg }, topic :: TopicName | opts } (Promise (Array RecordMetadata))

#send Source

send :: forall opts opts_ msg msgOpts_. Union opts opts_ SendRecordImpl => Union msg msgOpts_ ProducerMessageOptionsImpl => { messages :: Array { value :: Value | msg }, topic :: TopicName | opts } -> Producer -> Aff (Array RecordMetadata)