Skip to content

Commit

Permalink
#586 fix wrong parentheses in connectivity config
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schneider <johannes.schneider@bosch.io>
  • Loading branch information
jokraehe committed Jun 16, 2021
1 parent 025be98 commit ab2cb55
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 255 deletions.
321 changes: 161 additions & 160 deletions connectivity/service/src/main/resources/connectivity.conf
Expand Up @@ -327,180 +327,181 @@ ditto {
}
}
}
}

mapping {

# the buffer size used for the queue in the message mapping processor actor
buffer-size = 100
buffer-size = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_BUFFER_SIZE}

# parallelism to use for signal enriching a single message in the message mapping processor actor
# when configured too low, throughput of signal enrichment will be low
parallelism = 100
parallelism = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_PARALLELISM}

# maximum parallelism for mapping incoming and outgoing messages for a connection. This setting limits the
# poolSize that users can configure on their connections.
max-pool-size = 5
max-pool-size = ${?CONNECTIVITY_MESSAGE_MAPPING_MAX_POOL_SIZE}

javascript {
# the maximum script size in bytes of a mapping script to run
# prevents loading big JS dependencies into the script (e.g. jQuery which has ~250kB)
maxScriptSizeBytes = 50000 # 50kB
# the maximum execution time of a mapping script to run
# prevents endless loops and too complex scripts
maxScriptExecutionTime = 500ms
# the maximum call stack depth in the mapping script
# prevents recursions or other too complex computation
maxScriptStackDepth = 25
}
mapping {

# the buffer size used for the queue in the message mapping processor actor
buffer-size = 100
buffer-size = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_BUFFER_SIZE}

# parallelism to use for signal enriching a single message in the message mapping processor actor
# when configured too low, throughput of signal enrichment will be low
parallelism = 100
parallelism = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_PARALLELISM}

# maximum parallelism for mapping incoming and outgoing messages for a connection. This setting limits the
# poolSize that users can configure on their connections.
max-pool-size = 5
max-pool-size = ${?CONNECTIVITY_MESSAGE_MAPPING_MAX_POOL_SIZE}

javascript {
# the maximum script size in bytes of a mapping script to run
# prevents loading big JS dependencies into the script (e.g. jQuery which has ~250kB)
maxScriptSizeBytes = 50000 # 50kB
# the maximum execution time of a mapping script to run
# prevents endless loops and too complex scripts
maxScriptExecutionTime = 500ms
# the maximum call stack depth in the mapping script
# prevents recursions or other too complex computation
maxScriptStackDepth = 25
}

mapper-limits {
# maximum number of mappers defined in one source
max-source-mappers = 10
# maximum number of messages invoked by a mapper
# defined in source
max-mapped-inbound-messages = 10
# maximum number of mappers defined in one source
max-target-mappers = 10
# maximum number of messages invoked by a mapper
# defined in target
max-mapped-outbound-messages = 10
mapper-limits {
# maximum number of mappers defined in one source
max-source-mappers = 10
# maximum number of messages invoked by a mapper
# defined in source
max-mapped-inbound-messages = 10
# maximum number of mappers defined in one source
max-target-mappers = 10
# maximum number of messages invoked by a mapper
# defined in target
max-mapped-outbound-messages = 10
}
}
}

signal-enrichment {
// Beware: Despite similarities with gateway signal-enrichment providers,
// this class is different and not compatible with them.
provider = "org.eclipse.ditto.connectivity.service.mapping.ConnectivityCachingSignalEnrichmentProvider"
provider = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_PROVIDER}

provider-config {
# timeout for all facades
ask-timeout = 10s
ask-timeout = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_ASK_TIMEOUT}

cache {
# how many things to cache in total on a single cluster node
maximum-size = 20000
maximum-size = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_CACHE_MAXIMUM_SIZE}

# maximum duration of inconsistency after e.g. a policy update
expire-after-create = 2m
expire-after-create = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_CACHE_EXPIRE_AFTER_CREATE}
signal-enrichment {
// Beware: Despite similarities with gateway signal-enrichment providers,
// this class is different and not compatible with them.
provider = "org.eclipse.ditto.connectivity.service.mapping.ConnectivityCachingSignalEnrichmentProvider"
provider = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_PROVIDER}

provider-config {
# timeout for all facades
ask-timeout = 10s
ask-timeout = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_ASK_TIMEOUT}

cache {
# how many things to cache in total on a single cluster node
maximum-size = 20000
maximum-size = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_CACHE_MAXIMUM_SIZE}

# maximum duration of inconsistency after e.g. a policy update
expire-after-create = 2m
expire-after-create = ${?CONNECTIVITY_SIGNAL_ENRICHMENT_CACHE_EXPIRE_AFTER_CREATE}
}
}
}
}

persistence-ping {
# journal tag to query to find our which connectionPersistenceActors to ping (reconnect)
journal-tag = ""
journal-tag = ${?RECONNECT_JOURNAL_TAG}
# initial delay for pinging / reconnecting the connections after the PersistencePingActor has been started.
initial-delay = 0s
initial-delay = ${?RECONNECT_INITIAL_DELAY}
# interval for trying to reconnect all started connections.
interval = 10m
interval = ${?RECONNECT_INTERVAL}
# how many events to read in one query
read-journal-batch-size = 500
read-journal-batch-size = ${?RECONNECT_READ_JOURNAL_BATCH_SIZE}

# one of:
# TAGS Elements will be ordered by their tags.
# ID Elements will be ordered by their document ID.
streaming-order = TAGS
streaming-order = ${?PERSISTENCE_PING_STREAMING_ORDER}

# used to throttle pinging of connections, so that not all connections are recovered at the same time
rate {
frequency = 1s
frequency = ${?RECONNECT_RATE_FREQUENCY}
entities = 1
entities = ${?RECONNECT_RATE_ENTITIES}
persistence-ping {
# journal tag to query to find our which connectionPersistenceActors to ping (reconnect)
journal-tag = ""
journal-tag = ${?RECONNECT_JOURNAL_TAG}
# initial delay for pinging / reconnecting the connections after the PersistencePingActor has been started.
initial-delay = 0s
initial-delay = ${?RECONNECT_INITIAL_DELAY}
# interval for trying to reconnect all started connections.
interval = 10m
interval = ${?RECONNECT_INTERVAL}
# how many events to read in one query
read-journal-batch-size = 500
read-journal-batch-size = ${?RECONNECT_READ_JOURNAL_BATCH_SIZE}

# one of:
# TAGS Elements will be ordered by their tags.
# ID Elements will be ordered by their document ID.
streaming-order = TAGS
streaming-order = ${?PERSISTENCE_PING_STREAMING_ORDER}

# used to throttle pinging of connections, so that not all connections are recovered at the same time
rate {
frequency = 1s
frequency = ${?RECONNECT_RATE_FREQUENCY}
entities = 1
entities = ${?RECONNECT_RATE_ENTITIES}
}
}
}

connection-ids-retrieval {
# how many events to read in one query
read-journal-batch-size = 500
read-journal-batch-size = ${?CONNECTION_IDS_RETRIEVAL_READ_JOURNAL_BATCH_SIZE}
# how many snapshots to read in one query
read-snapshot-batch-size = 50
read-snapshot-batch-size = ${?CONNECTION_IDS_RETRIEVAL_READ_SNAPSHOT_BATCH_SIZE}
}
connection-ids-retrieval {
# how many events to read in one query
read-journal-batch-size = 500
read-journal-batch-size = ${?CONNECTION_IDS_RETRIEVAL_READ_JOURNAL_BATCH_SIZE}
# how many snapshots to read in one query
read-snapshot-batch-size = 50
read-snapshot-batch-size = ${?CONNECTION_IDS_RETRIEVAL_READ_SNAPSHOT_BATCH_SIZE}
}

client {
# Initial timeout when connecting to a remote system. If the connection could not be established after this time, the
# service will try to reconnect. If a failure happened during connecting, then the service will wait for at least
# this time until it will try to reconnect. The max timeout is defined in connecting-max-timeout.
connecting-min-timeout = 60s
connecting-min-timeout = ${?CONNECTIVITY_CLIENT_CONNECTING_MIN_TIMEOUT}
# Max timeout (until reconnecting) when connecting to a remote system.
# Should be greater than connecting-min-timeout.
connecting-max-timeout = 60m
connecting-max-timeout = ${?CONNECTIVITY_CLIENT_CONNECTING_MAX_TIMEOUT}
# How many times we will try to reconnect when connecting to a remote system.
# max time ~= connecting-max-tries * connecting-max-timeout = 50 * 60m = 50h
connecting-max-tries = 50
connecting-max-tries = ${?CONNECTIVITY_CLIENT_CONNECTING_MAX_TRIES}
# Max timeout when actually disconnecting until we're assuming disconnecting failed. The timeout will start
# after a disconnect announcment was sent (see disconnect-announcement-timeout) and disconnecting is actually
# triggered. Thus, the total amount of timeout that might elapse between closing a connection and running into
# the timeout, is: disconnect-announcement-timeout + disconnecting-max-timeout.
disconnecting-max-timeout = ${ditto.connectivity.client.connecting-min-timeout}
disconnecting-max-timeout = ${?CONNECTIVITY_CLIENT_DISCONNECTING_MAX_TIMEOUT}
# Time that will be waited between sending a disconnect announcement and actually disconnecting.
# When closing a connection, a disconnect announcement (special topic for connection targets) will be sent to
# the client. The connection will wait for disconnect-announcement-timeout before actually disconnecting
# the client.
disconnect-announcement-timeout = 3s
disconnect-announcement-timeout = ${?CONNECTIVITY_CLIENT_DISCONNECT_ANNOUNCEMENT_TIMEOUT}
# Max timeout until waiting for search commands.
subscription-manager-timeout = 60s
subscription-manager-timeout = ${?CONNECTIVITY_CLIENT_SUBSCRIPTION_MANAGER_TIMEOUT}
# how long the service will wait for a successful connection when testing a new connection. If no response is
# received after this duration, the test will be assumed a failure.
testing-timeout = 10s
testing-timeout = ${?CONNECTIVITY_CLIENT_TESTING_TIMEOUT}
# Min backoff after connection failure.
min-backoff = 5s
min-backoff = ${?CONNECTIVITY_CLIENT_MIN_BACKOFF}
# Max backoff after connection failure.
max-backoff = 60m
max-backoff = ${?CONNECTIVITY_CLIENT_MAX_BACKOFF}
# How often to refresh the cache of other client actors if client count > 1
client-actor-refs-notification-delay = 5m
}
client {
# Initial timeout when connecting to a remote system. If the connection could not be established after this time, the
# service will try to reconnect. If a failure happened during connecting, then the service will wait for at least
# this time until it will try to reconnect. The max timeout is defined in connecting-max-timeout.
connecting-min-timeout = 60s
connecting-min-timeout = ${?CONNECTIVITY_CLIENT_CONNECTING_MIN_TIMEOUT}
# Max timeout (until reconnecting) when connecting to a remote system.
# Should be greater than connecting-min-timeout.
connecting-max-timeout = 60m
connecting-max-timeout = ${?CONNECTIVITY_CLIENT_CONNECTING_MAX_TIMEOUT}
# How many times we will try to reconnect when connecting to a remote system.
# max time ~= connecting-max-tries * connecting-max-timeout = 50 * 60m = 50h
connecting-max-tries = 50
connecting-max-tries = ${?CONNECTIVITY_CLIENT_CONNECTING_MAX_TRIES}
# Max timeout when actually disconnecting until we're assuming disconnecting failed. The timeout will start
# after a disconnect announcment was sent (see disconnect-announcement-timeout) and disconnecting is actually
# triggered. Thus, the total amount of timeout that might elapse between closing a connection and running into
# the timeout, is: disconnect-announcement-timeout + disconnecting-max-timeout.
disconnecting-max-timeout = ${ditto.connectivity.client.connecting-min-timeout}
disconnecting-max-timeout = ${?CONNECTIVITY_CLIENT_DISCONNECTING_MAX_TIMEOUT}
# Time that will be waited between sending a disconnect announcement and actually disconnecting.
# When closing a connection, a disconnect announcement (special topic for connection targets) will be sent to
# the client. The connection will wait for disconnect-announcement-timeout before actually disconnecting
# the client.
disconnect-announcement-timeout = 3s
disconnect-announcement-timeout = ${?CONNECTIVITY_CLIENT_DISCONNECT_ANNOUNCEMENT_TIMEOUT}
# Max timeout until waiting for search commands.
subscription-manager-timeout = 60s
subscription-manager-timeout = ${?CONNECTIVITY_CLIENT_SUBSCRIPTION_MANAGER_TIMEOUT}
# how long the service will wait for a successful connection when testing a new connection. If no response is
# received after this duration, the test will be assumed a failure.
testing-timeout = 10s
testing-timeout = ${?CONNECTIVITY_CLIENT_TESTING_TIMEOUT}
# Min backoff after connection failure.
min-backoff = 5s
min-backoff = ${?CONNECTIVITY_CLIENT_MIN_BACKOFF}
# Max backoff after connection failure.
max-backoff = 60m
max-backoff = ${?CONNECTIVITY_CLIENT_MAX_BACKOFF}
# How often to refresh the cache of other client actors if client count > 1
client-actor-refs-notification-delay = 5m
}

monitoring {
logger {
successCapacity = 10
successCapacity = ${?CONNECTIVITY_LOGGER_SUCCESS_CAPACITY}
failureCapacity = 10
failureCapacity = ${?CONNECTIVITY_LOGGER_FAILURE_CAPACITY}
maxLogSizeBytes = 250000
maxLogSizeBytes = ${?CONNECTIVITY_LOGGER_MAX_LOG_SIZE_BYTES}
logDuration = 1h
logDuration = ${?CONNECTIVITY_LOGGER_LOG_DURATION}
loggingActiveCheckInterval = 5m
loggingActiveCheckInterval = ${?CONNECTIVITY_LOGGER_ACTIVE_CHECK_INTERVAL}
monitoring {
logger {
successCapacity = 10
successCapacity = ${?CONNECTIVITY_LOGGER_SUCCESS_CAPACITY}
failureCapacity = 10
failureCapacity = ${?CONNECTIVITY_LOGGER_FAILURE_CAPACITY}
maxLogSizeBytes = 250000
maxLogSizeBytes = ${?CONNECTIVITY_LOGGER_MAX_LOG_SIZE_BYTES}
logDuration = 1h
logDuration = ${?CONNECTIVITY_LOGGER_LOG_DURATION}
loggingActiveCheckInterval = 5m
loggingActiveCheckInterval = ${?CONNECTIVITY_LOGGER_ACTIVE_CHECK_INTERVAL}
}
counter {}
}
counter {}
}

default-config-provider = true
default-config-provider = ${?CONNECTIVITY_DEFAULT_CONFIG_PROVIDER}
default-config-provider = true
default-config-provider = ${?CONNECTIVITY_DEFAULT_CONFIG_PROVIDER}

tunnel {
# 0 workers mean the sshd client defaults which are: `Runtime.getRuntime().availableProcessors() + 1`
workers = 0
heartbeat-interval = 30s
# by default, keep the tunnel open forever:
idle-timeout = 0s
socket-keepalive = true
}

tunnel {
# 0 workers mean the sshd client defaults which are: `Runtime.getRuntime().availableProcessors() + 1`
workers = 0
heartbeat-interval = 30s
# by default, keep the tunnel open forever:
idle-timeout = 0s
socket-keepalive = true
}
}
}
Expand Down

0 comments on commit ab2cb55

Please sign in to comment.