Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify usage of kafka-protocol builders #1343

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions shotover/src/transforms/kafka/sink_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use std::sync::Arc;
use std::time::Duration;
use tokio::sync::{mpsc, oneshot, RwLock};
use tokio::time::timeout;
use uuid::Uuid;

#[derive(Serialize, Deserialize, Debug)]
#[serde(deny_unknown_fields)]
Expand Down Expand Up @@ -432,16 +431,12 @@ impl KafkaSinkCluster {
.request_api_key(ApiKey::FindCoordinatorKey as i16)
.request_api_version(2)
.correlation_id(0)
.client_id(None)
.unknown_tagged_fields(Default::default())
.build()
.unwrap(),
body: RequestBody::FindCoordinator(
FindCoordinatorRequest::builder()
.coordinator_keys(vec![])
.key_type(0)
.key(group.0)
.unknown_tagged_fields(Default::default())
.build()
.unwrap(),
),
Expand Down Expand Up @@ -485,8 +480,6 @@ impl KafkaSinkCluster {
.request_api_key(ApiKey::MetadataKey as i16)
.request_api_version(4)
.correlation_id(0)
.client_id(None)
.unknown_tagged_fields(Default::default())
.build()
.unwrap(),
body: RequestBody::Metadata(
Expand All @@ -497,17 +490,11 @@ impl KafkaSinkCluster {
.map(|name| {
MetadataRequestTopic::builder()
.name(Some(name))
.topic_id(Uuid::nil())
.unknown_tagged_fields(Default::default())
.build()
.unwrap()
})
.collect(),
))
.allow_auto_topic_creation(false)
.include_cluster_authorized_operations(false)
.include_topic_authorized_operations(false)
.unknown_tagged_fields(Default::default())
.build()
.unwrap(),
),
Expand Down
Loading