From d18f4ba55056a922ac3988ca7396c66d0a40ef1d Mon Sep 17 00:00:00 2001 From: Gilbert Wong Date: Thu, 28 Feb 2019 11:08:13 +0800 Subject: [PATCH] Fix wrong config entries --- etc/emqx.conf | 21 +++++++++++++-------- priv/emqx.schema | 8 ++++++-- src/portal/emqx_portal.erl | 4 ++-- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/etc/emqx.conf b/etc/emqx.conf index 8dc510a31..2668c41a2 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -1723,16 +1723,21 @@ listener.wss.external.ciphers = ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-G ## Inflight size. ## ## Value: Integer -## bridge.aws.max_inflight = 32 +## bridge.aws.max_inflight_batches = 32 -## Maximum number of messages in one batch when sending to remote borkers -## NOTE: when bridging via MQTT connection to remote broker, this config is only -## used for internal message passing optimization as the underlying MQTT -## protocol does not supports batching. +## Max number of messages to collect in a batch for +## each send call towards emqx_portal_connect ## ## Value: Integer ## default: 32 -## bridge.aws.queue.batch_size = 32 +## bridge.aws.queue.batch_count_limit = 32 + +## Max number of bytes to collect in a batch for each +## send call towards emqx_portal_connect +## +## Value: Bytesize +## default: 1000M +## bridge.aws.queue.batch_bytes_limit = 1000MB ## Base directory for replayq to store messages on disk ## If this config entry is missing or set to undefined, @@ -1767,7 +1772,7 @@ listener.wss.external.ciphers = ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-G ## The ClientId of a remote bridge. ## ## Value: String -## bridge.azure.client_id = bridge_aws +## bridge.azure.client_id = bridge_azure ## The Clean start flag of a remote bridge. ## @@ -1876,7 +1881,7 @@ listener.wss.external.ciphers = ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-G ## Inflight size. ## ## Value: Integer -## bridge.azure.max_inflight = 32 +## bridge.azure.max_inflight_batches = 32 ## Maximum number of messages in one batch when sending to remote borkers ## NOTE: when bridging via MQTT connection to remote broker, this config is only diff --git a/priv/emqx.schema b/priv/emqx.schema index 388b9beea..4ca43f232 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -1600,15 +1600,19 @@ end}. {datatype, {duration, ms}} ]}. -{mapping, "bridge.$name.max_inflight", "emqx.bridges", [ +{mapping, "bridge.$name.max_inflight_batches", "emqx.bridges", [ {default, 0}, {datatype, integer} ]}. -{mapping, "bridge.$name.queue.batch_size", "emqx.bridges", [ +{mapping, "bridge.$name.queue.batch_count_limit", "emqx.bridges", [ {datatype, integer} ]}. +{mapping, "bridge.$name.queue.batch_bytes_limit", "emqx.bridges", [ + {datatype, bytesize} +]}. + {mapping, "bridge.$name.queue.replayq_dir", "emqx.bridges", [ {datatype, string} ]}. diff --git a/src/portal/emqx_portal.erl b/src/portal/emqx_portal.erl index 8ef764c39..4a6ad2437 100644 --- a/src/portal/emqx_portal.erl +++ b/src/portal/emqx_portal.erl @@ -114,9 +114,9 @@ %% queue.batch_bytes_limit: Max number of bytes to collect in a batch for each %% send call towards emqx_portal_connect %% queue.batch_count_limit: Max number of messages to collect in a batch for -%% each send call towards eqmx_portal_connect +%% each send call towards emqx_portal_connect %% queue.replayq_dir: Directory where replayq should persist messages -%% queue.replayq_seg_bytes: Size in bytes for each replqyq segnment file +%% queue.replayq_seg_bytes: Size in bytes for each replayq segment file %% %% Find more connection specific configs in the callback modules %% of emqx_portal_connect behaviour.