Skip to content

Commit fe92f2c

Browse files
committed
Release 2.12.0
1 parent 5c0a054 commit fe92f2c

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

CHANGELOG.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@ The `Unreleased` section name is replaced by the expected version of next releas
99
## [Unreleased]
1010

1111
### Added
12+
### Changed
13+
### Removed
14+
### Fixed
1215

13-
- `Kafka.Producers`: optional constructor parameters [#135](https://github.com/jet/propulsion/pull/135) :pray: [avsaditya19](https://github.com/avsaditya19)
16+
<a name="2.12.0"></a>
17+
## [2.12.0] - 2022-01-28
18+
19+
### Added
1420

21+
- `Kafka.Producers`: optional constructor parameters [#135](https://github.com/jet/propulsion/pull/135) :pray: [avsaditya19](https://github.com/avsaditya19)
1522

1623
### Changed
1724

1825
- `EventStore`: Target `Equinox.EventStore` v `3.0.6` [#136](https://github.com/jet/propulsion/pull/136)
1926

20-
### Removed
21-
### Fixed
22-
2327
<a name="2.12.0-rc.3"></a>
2428
## [2.12.0-rc.3] - 2021-12-24
2529

@@ -689,7 +693,8 @@ The `Unreleased` section name is replaced by the expected version of next releas
689693

690694
## squashed prior to initial relevant commit
691695

692-
[Unreleased]: https://github.com/jet/propulsion/compare/2.12.0-rc.3...HEAD
696+
[Unreleased]: https://github.com/jet/propulsion/compare/2.12.0...HEAD
697+
[2.12.0]: https://github.com/jet/propulsion/compare/2.12.0-rc.3...2.12.0
693698
[2.12.0-rc.3]: https://github.com/jet/propulsion/compare/2.12.0-rc.2...2.12.0-rc.3
694699
[2.12.0-rc.2]: https://github.com/jet/propulsion/compare/2.12.0-rc.1...2.12.0-rc.2
695700
[2.12.0-rc.1]: https://github.com/jet/propulsion/compare/2.11.0...2.12.0-rc.1

src/Propulsion.Kafka/Producers.fs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Producer
1616
// Deprecated; there's a good chance this will be removed
1717
?degreeOfParallelism,
1818
/// Miscellaneous configuration parameters to be passed to the underlying Confluent.Kafka producer configuration. Same as constructor argument for Confluent.Kafka >=1.2.
19-
?config,
19+
?config,
2020
/// Miscellaneous configuration parameters to be passed to the underlying Confluent.Kafka producer configuration.
2121
?custom,
2222
/// Postprocesses the ProducerConfig after the rest of the rules have been applied
@@ -33,24 +33,19 @@ type Producer
3333
let produceStats = Streams.Internal.ConcurrentLatencyStats(sprintf "producers(%d)" producers.Length)
3434
let mutable robin = 0
3535

36-
member __.DumpStats log = produceStats.Dump log
36+
member _.DumpStats log = produceStats.Dump log
3737

3838
/// Execute a producer operation, including recording of the latency statistics for the operation
3939
/// NOTE: the `execute` function is expected to throw in the event of a failure to produce (this is the standard semantic for all Confluent.Kafka ProduceAsync APIs)
40-
member __.Produce(execute : KafkaProducer -> Async<'r>) : Async<'r> = async {
40+
member _.Produce(execute : KafkaProducer -> Async<'r>) : Async<'r> = async {
4141
let producer = producers.[System.Threading.Interlocked.Increment(&robin) % producers.Length]
4242
let sw = System.Diagnostics.Stopwatch.StartNew()
4343
let! res = execute producer
4444
produceStats.Record sw.Elapsed
4545
return res }
4646

4747
/// Throws if producing fails, per normal Confluent.Kafka 1.x semantics
48-
member __.Produce(key, value, ?headers) =
48+
member x.Produce(key, value, ?headers) =
4949
match headers with
50-
| Some h -> __.Produce(fun producer -> producer.ProduceAsync(key, value, h) |> Async.Ignore)
51-
| None -> __.Produce(fun producer -> producer.ProduceAsync(key, value) |> Async.Ignore)
52-
53-
[<Obsolete("Please migrate code to an appropriate Produce overload")>]
54-
/// Throws if producing fails, per normal Confluent.Kafka 1.x semantics
55-
member __.ProduceAsync(key, value) =
56-
__.Produce(fun x -> x.ProduceAsync(key, value))
50+
| Some h -> x.Produce(fun producer -> producer.ProduceAsync(key, value, h) |> Async.Ignore)
51+
| None -> x.Produce(fun producer -> producer.ProduceAsync(key, value) |> Async.Ignore)

0 commit comments

Comments
 (0)