diff --git a/src/connector/src/source/nats/mod.rs b/src/connector/src/source/nats/mod.rs index 0ba35d20269d..e012dedfac55 100644 --- a/src/connector/src/source/nats/mod.rs +++ b/src/connector/src/source/nats/mod.rs @@ -126,8 +126,11 @@ pub struct NatsPropertiesConsumer { #[serde(rename = "consumer.filter_subject")] pub filter_subject: Option, - #[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>, #[serde(rename = "consumer.replay_policy")] @@ -178,8 +181,11 @@ pub struct NatsPropertiesConsumer { #[serde_as(as = "Option")] pub memory_storage: Option, - #[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>, } diff --git a/src/connector/with_options_source.yaml b/src/connector/with_options_source.yaml index b3f1a3769f19..5f9be2070635 100644 --- a/src/connector/with_options_source.yaml +++ b/src/connector/with_options_source.yaml @@ -537,6 +537,7 @@ NatsProperties: - name: consumer.filter_subjects field_type: Vec required: false + default: Default::default - name: consumer.replay_policy field_type: String required: false @@ -578,6 +579,7 @@ NatsProperties: - name: consumer.backoff.sec field_type: Vec required: false + default: Default::default - name: scan.startup.mode field_type: String required: false