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

fix: remove redundant consumer_durable_name #19090

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
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: 2 additions & 11 deletions src/connector/src/source/nats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub struct NatsProperties {
#[serde(rename = "stream")]
pub stream: String,

#[serde(rename = "durable_consumer_name")]
#[serde(rename = "consumer.durable_name")]
pub durable_consumer_name: String,

#[serde(flatten)]
Expand All @@ -121,9 +121,6 @@ pub struct NatsPropertiesConsumer {
#[serde(rename = "consumer.deliver_subject")]
pub deliver_subject: Option<String>,

#[serde(rename = "consumer.durable_name")]
pub durable_name: Option<String>,

#[serde(rename = "consumer.name")]
pub name: Option<String>,

Expand Down Expand Up @@ -217,9 +214,6 @@ impl NatsPropertiesConsumer {
if let Some(v) = &self.name {
c.name = Some(v.clone())
}
if let Some(v) = &self.durable_name {
c.durable_name = Some(v.clone())
}
if let Some(v) = &self.description {
c.description = Some(v.clone())
}
Expand Down Expand Up @@ -353,10 +347,7 @@ mod test {
props.nats_properties_consumer.name,
Some("foobar".to_string())
);
assert_eq!(
props.nats_properties_consumer.durable_name,
Some("durable_foobar".to_string())
);
assert_eq!(props.durable_consumer_name, "durable_foobar".to_string());
assert_eq!(
props.nats_properties_consumer.description,
Some("A description".to_string())
Expand Down
5 changes: 1 addition & 4 deletions src/connector/with_options_source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,6 @@ NatsProperties:
- name: consumer.deliver_subject
field_type: String
required: false
- name: consumer.durable_name
field_type: String
required: false
- name: consumer.name
field_type: String
required: false
Expand Down Expand Up @@ -643,7 +640,7 @@ NatsProperties:
- name: stream
field_type: String
required: true
- name: durable_consumer_name
- name: consumer.durable_name
field_type: String
required: true
NexmarkProperties:
Expand Down
Loading