git.iko.soy/rowtype-yoga/purescript-kafkajs
on main help sign in
Add maxInFlightRequests
0f920e0hivemind-js
src/Kafka.purs+3
@@ -54,11 +54,13 @@ foreign import data Producer :: Type
54type ProducerConfig
54type ProducerConfig
55 = { idempotent :: Maybe Boolean
55 = { idempotent :: Maybe Boolean
56 , transactionalId :: Maybe String
56 , transactionalId :: Maybe String
57+ , maxInFlightRequests :: Maybe Int
57 }
58 }
58
59
59type InternalProducerConfig
60type InternalProducerConfig
60 = { idempotent :: Nullable Boolean
61 = { idempotent :: Nullable Boolean
61 , transactionalId :: Nullable String
62 , transactionalId :: Nullable String
63+ , maxInFlightRequests :: Nullable Int
62 }
64 }
63
65
64foreign import makeClientImpl :: InternalKafkaConfig -> Kafka
66foreign import makeClientImpl :: InternalKafkaConfig -> Kafka
@@ -81,6 +83,7 @@ makeProducer k pc = runFn2 makeProducerImpl k ipc
81 ipc =
83 ipc =
82 { idempotent: toNullable pc.idempotent
84 { idempotent: toNullable pc.idempotent
83 , transactionalId: toNullable pc.transactionalId
85 , transactionalId: toNullable pc.transactionalId
86+ , maxInFlightRequests : toNullable pc.maxInFlightRequests
84 }
87 }
85
88
86foreign import connectImpl :: Producer -> Effect (Promise Unit)
89foreign import connectImpl :: Producer -> Effect (Promise Unit)