Skip to content

Commit

Permalink
Fix CompressionType logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Apr 12, 2019
1 parent a478997 commit f1ca3ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Jet.ConfluentKafka.FSharp/ConfluentKafka.fs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module private Config =

/// See https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md for documentation on the implications of specfic settings
[<NoComparison>]
type KafkaProducerConfig private (conf, cfgs, broker : Uri, compression, acks : Acks) =
type KafkaProducerConfig private (conf, cfgs, broker : Uri, compression : CompressionType, acks : Acks) =
member val Conf : ProducerConfig = conf
member val Acks = acks
member val Broker = broker
Expand Down Expand Up @@ -50,13 +50,14 @@ type KafkaProducerConfig private (conf, cfgs, broker : Uri, compression, acks :
?partitioner,
/// Misc configuration parameter to be passed to the underlying CK producer.
?custom) =
let compression = defaultArg compression CompressionType.None
let c =
ProducerConfig(
ClientId = clientId, BootstrapServers = Config.validateBrokerUri broker,
RetryBackoffMs = Nullable (match retryBackoff with Some (t : TimeSpan) -> int t.TotalMilliseconds | None -> 1000),
MessageSendMaxRetries = Nullable (defaultArg retries 60),
Acks = Nullable acks,
CompressionType = Nullable (defaultArg compression CompressionType.None),
CompressionType = Nullable compression,
LingerMs = Nullable (match linger with Some t -> int t.TotalMilliseconds | None -> 10),
SocketKeepaliveEnable = Nullable (defaultArg socketKeepAlive true),
Partitioner = Nullable (defaultArg partitioner Partitioner.ConsistentRandom),
Expand Down

0 comments on commit f1ca3ec

Please sign in to comment.