Crates.io | madsim-rdkafka |
lib.rs | madsim-rdkafka |
version | 0.4.2+0.34.0 |
source | src |
created_at | 2022-09-26 03:32:27.060955 |
updated_at | 2024-05-13 04:51:38.186143 |
description | The rdkafka simulator on madsim. |
homepage | https://github.com/madsim-rs/madsim |
repository | https://github.com/madsim-rs/madsim |
max_upload_size | |
id | 673949 |
size | 457,259 |
The rdkafka
simulator on madsim. Mirrors rdkafka v0.34.0 and librdkafka 2.3.0.
Replace all rdkafka
entries in your Cargo.toml:
[dependencies]
rdkafka = { version = "0.4", package = "madsim-rdkafka" }
This crate roughly follows the rdkafka API but is NOT exactly the same.
The following functions are modified to be async
:
FromClientConfig::from_config
FromClientConfigAndContext::from_config_and_context
ClientConfig::create
ClientConfig::create_with_context
Client::fetch_metadata
1Client::fetch_watermarks
1Client::fetch_group_list
1Consumer::seek
Consumer::seek_partitions
Consumer::commit
Consumer::commit_consumer_state
Consumer::commit_message
Consumer::committed
Consumer::committed_offsets
Consumer::offsets_for_timestamp
Consumer::offsets_for_times
1Consumer::fetch_metadata
1Consumer::fetch_watermarks
1Consumer::fetch_group_list
1Producer::flush
Producer::init_transactions
Producer::send_offsets_to_transaction
Producer::commit_transaction
Producer::abort_transaction
The associated constant ClientContext::ENABLE_REFRESH_OAUTH_TOKEN
is changed to a function in order to make the trait object-safe.
This crate has cherry-picked a commit from Materialize to support rewriting broker addresses.
A new method is added to ClientContext
:
ClientContext::rewrite_broker_addr