Module
Yoga.Kafka.Producer
- Package
- purescript-yoga-kafka
- Repository
- rowtype-yoga/purescript-yoga-kafka
#ProducerOptionsImpl Source
type ProducerOptionsImpl :: Row Typetype ProducerOptionsImpl = (allowAutoTopicCreation :: Boolean, transactionTimeout :: Milliseconds)
#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
type SendRecordImpl :: Row Typetype SendRecordImpl = (messages :: Array (Record ProducerMessageOptionsImpl), topic :: TopicName)
#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)