rust-rdkafka v0.24.0 Release Notes
Release Date: 2020-07-08 // almost 4 years ago-
๐ฅ Breaking change. Introduce a dependency on Tokio for the
StreamConsumer
in its default configuration. The new implementation is more efficient and does not require a background thread and an extra futures executor.Introduce the
StreamConsumer::start_with_runtime
andFutureProducer::send_with_runtime
methods. These methods are identical to their respective non-_with_runtime
counterparts, except that they take an additionalAsyncRuntime
generic parameter that permits using an asynchronous runtime besides Tokio.
For an example of using rdkafka with the [smol] runtime, see the new smol runtime example.
๐ฅ Breaking change. Remove the
StreamConsumer::stop
method. To stop aStreamConsumer
after callingstart
, simply drop the resultingMessageStream
.๐ฅ Breaking change. Overhaul the
FutureProducer::send
method. The old implementation incorrectly blocked asynchronous tasks withstd::thread::sleep
and theblock_ms
parameter did not behave as documented.
The new implementation:
* changes the `block_ms: i64` parameter to `queue_timeout: impl Into<Timeout>`, to better match how timeouts are handled elsewhere in the rust-rdkafka API, * depends on Tokio, in order to retry enqueuing after a time interval without using `std::thread::sleep`, * returns an opaque future that borrows its input, rather than a `DeliveryFuture` with no internal references, * simplifies the output type of the returned future from `Result<OwnedDeliveryResult, oneshot::Canceled>` to `OwnedDeliveryResult`.
Thanks to @FSMaxB-dooshop for discovering the issue and contributing the initial fix.
๐ฅ Breaking change. Remove the
util::duration_to_millis
function. This functionality has been available in the standard library asstd::time::Duration::as_millis
for over a year.Introduce the
BaseConsumer::split_partition_queue
method to allow reading messages from partitions independently of one another.๐ฏ Implement
Clone
,Copy
, andDebug
forCommitMode
.Decouple versioning of rdkafka-sys from rdkafka. rdkafka-sys now has its own [changelog](rdkafka-sys/changelog.md) and will follow SemVer conventions. (#211)
๐ [smol]: docs.rs/smol