From d524f8c805cfc7b64031906d7d28c85790593eb1 Mon Sep 17 00:00:00 2001 From: Kjell Winblad Date: Thu, 8 Jun 2023 15:58:19 +0200 Subject: [PATCH] refactor: rename config parameter --- apps/emqx_bridge_kafka/src/emqx_bridge_kafka.erl | 4 ++-- .../src/emqx_bridge_kafka_impl_producer.erl | 6 +++--- rel/i18n/emqx_bridge_kafka.hocon | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/emqx_bridge_kafka/src/emqx_bridge_kafka.erl b/apps/emqx_bridge_kafka/src/emqx_bridge_kafka.erl index 54cddb735..5f0dcee72 100644 --- a/apps/emqx_bridge_kafka/src/emqx_bridge_kafka.erl +++ b/apps/emqx_bridge_kafka/src/emqx_bridge_kafka.erl @@ -303,12 +303,12 @@ fields(producer_kafka_opts) -> desc => ?DESC(query_mode) } )}, - {query_mode_sync_timeout, + {sync_query_timeout, mk( emqx_schema:duration_ms(), #{ default => <<"5s">>, - desc => ?DESC(query_mode_sync_timeout) + desc => ?DESC(sync_query_timeout) } )} ]; diff --git a/apps/emqx_bridge_kafka/src/emqx_bridge_kafka_impl_producer.erl b/apps/emqx_bridge_kafka/src/emqx_bridge_kafka_impl_producer.erl index b5799a91a..563e7dd46 100644 --- a/apps/emqx_bridge_kafka/src/emqx_bridge_kafka_impl_producer.erl +++ b/apps/emqx_bridge_kafka/src/emqx_bridge_kafka_impl_producer.erl @@ -50,7 +50,7 @@ on_start(InstId, Config) -> kafka := KafkaConfig = #{ message := MessageTemplate, topic := KafkaTopic, - query_mode_sync_timeout := QueryModeSyncTimeout + sync_query_timeout := SyncQueryTimeout }, metadata_request_timeout := MetaReqTimeout, min_metadata_refresh_interval := MinMetaRefreshInterval, @@ -108,7 +108,7 @@ on_start(InstId, Config) -> kafka_topic => KafkaTopic, producers => Producers, resource_id => ResourceId, - query_mode_sync_timeout => QueryModeSyncTimeout + sync_query_timeout => SyncQueryTimeout }}; {error, Reason2} -> ?SLOG(error, #{ @@ -201,7 +201,7 @@ on_query( #{ message_template := Template, producers := Producers, - query_mode_sync_timeout := SyncTimeout + sync_query_timeout := SyncTimeout } ) -> ?tp(emqx_bridge_kafka_impl_producer_sync_query, #{}), diff --git a/rel/i18n/emqx_bridge_kafka.hocon b/rel/i18n/emqx_bridge_kafka.hocon index 86acd81fe..fcb9b0074 100644 --- a/rel/i18n/emqx_bridge_kafka.hocon +++ b/rel/i18n/emqx_bridge_kafka.hocon @@ -166,7 +166,7 @@ consumer_offset_reset_policy.label: partition_count_refresh_interval.desc: """The time interval for Kafka producer to discover increased number of partitions. -After the number of partitions is increased in Kafka, EMQX will start taking the +After the number of partitions is increased in Kafka, EMQX will start taking the discovered partitions into account when dispatching messages per partition_strategy.""" partition_count_refresh_interval.label: @@ -364,10 +364,10 @@ query_mode.desc: query_mode.label: """Query mode""" -query_mode_sync_timeout.desc: +sync_query_timeout.desc: """This parameter defines the timeout limit for synchronous queries. It applies only when the bridge query mode is configured to 'sync'.""" -query_mode_sync_timeout.label: +sync_query_timeout.label: """Synchronous Query Timeout""" }