Skip to content

Commit

Permalink
fix(source/nats): add missing default attribute for vectors (#18261)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-awd authored Aug 28, 2024
1 parent 205acb4 commit 7998622
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/connector/src/source/nats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ pub struct NatsPropertiesConsumer {
#[serde(rename = "consumer.filter_subject")]
pub filter_subject: Option<String>,

#[serde(rename = "consumer.filter_subjects")]
#[serde(deserialize_with = "deserialize_optional_string_seq_from_string")]
#[serde(
rename = "consumer.filter_subjects",
default,
deserialize_with = "deserialize_optional_string_seq_from_string"
)]
pub filter_subjects: Option<Vec<String>>,

#[serde(rename = "consumer.replay_policy")]
Expand Down Expand Up @@ -178,8 +181,11 @@ pub struct NatsPropertiesConsumer {
#[serde_as(as = "Option<DisplayFromStr>")]
pub memory_storage: Option<bool>,

#[serde(rename = "consumer.backoff.sec")]
#[serde(deserialize_with = "deserialize_optional_u64_seq_from_string")]
#[serde(
rename = "consumer.backoff.sec",
default,
deserialize_with = "deserialize_optional_u64_seq_from_string"
)]
pub backoff: Option<Vec<u64>>,
}

Expand Down
2 changes: 2 additions & 0 deletions src/connector/with_options_source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ NatsProperties:
- name: consumer.filter_subjects
field_type: Vec<String>
required: false
default: Default::default
- name: consumer.replay_policy
field_type: String
required: false
Expand Down Expand Up @@ -578,6 +579,7 @@ NatsProperties:
- name: consumer.backoff.sec
field_type: Vec<u64>
required: false
default: Default::default
- name: scan.startup.mode
field_type: String
required: false
Expand Down

0 comments on commit 7998622

Please sign in to comment.