Browse Source

refactoring

pull/14327/head
Artem Barysh 3 months ago
parent
commit
25181bb1c8
  1. 5
      common/transport/snmp/src/main/java/org/thingsboard/server/transport/snmp/SnmpTransportContext.java
  2. 2
      transport/snmp/src/main/resources/tb-snmp-transport.yml

5
common/transport/snmp/src/main/java/org/thingsboard/server/transport/snmp/SnmpTransportContext.java

@ -109,11 +109,6 @@ public class SnmpTransportContext extends TransportContext {
batchIndex++;
break;
} catch (Exception e) {
if (e instanceof InterruptedException) {
log.warn("SNMP bootstrap interrupted. Stopping bootstrap task.", e);
return;
}
if (attempt >= snmpBootstrapBatchRetries) {
log.error("SNMP bootstrap: batch {} failed after {} attempts.", batchIndex, attempt, e);
return;

2
transport/snmp/src/main/resources/tb-snmp-transport.yml

@ -151,6 +151,8 @@ transport:
ignore_type_cast_errors: "${SNMP_RESPONSE_IGNORE_TYPE_CAST_ERRORS:false}"
# Thread pool size for scheduler that executes device querying tasks
scheduler_thread_pool_size: "${SNMP_SCHEDULER_THREAD_POOL_SIZE:4}"
# Maximum number of retry attempts for a single SNMP devices batch during bootstrap.
batch_retries: "${SNMP_BOOTSTRAP_RETRIES:8}"
sessions:
# Session inactivity timeout is a global configuration parameter that defines how long the device transport session will be opened after the last message arrives from the device.
# The parameter value is in milliseconds.

Loading…
Cancel
Save