Struct test_util::kafka::kafka_client::KafkaClient [−][src]
pub struct KafkaClient {
producer: FutureProducer<MzClientContext>,
kafka_url: String,
}
Fields
producer: FutureProducer<MzClientContext>
kafka_url: String
Implementations
pub fn new(
kafka_url: &str,
group_id: &str,
configs: &[(&str, &str)]
) -> Result<KafkaClient, Error>
pub async fn create_topic(
&self,
topic_name: &str,
partitions: i32,
replication: i32,
configs: &[(&str, &str)],
timeout: Option<Duration>
) -> Result<(), Error>
pub fn send_key_value(
&self,
topic_name: &str,
key: &[u8],
message: Option<Vec<u8>>
) -> Result<DeliveryFuture, KafkaError>
Auto Trait Implementations
impl !RefUnwindSafe for KafkaClient
impl Send for KafkaClient
impl Sync for KafkaClient
impl Unpin for KafkaClient
impl !UnwindSafe for KafkaClient
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more