Browse Source

Fixed TB_TRANSPORT_ACTIVITY_REPORTING_STRATEGY being ignored by standalone transports

The transport.activity.reporting_strategy property was defined only in
thingsboard.yml, so standalone MQTT, HTTP, CoAP, LwM2M and SNMP transport
services silently ignored TB_TRANSPORT_ACTIVITY_REPORTING_STRATEGY and
always used the LAST strategy. Add the same transport.activity block to
each tb-*-transport.yml.
pull/16522/head
Sergey Matvienko 1 month ago
parent
commit
4961851ce9
  1. 8
      transport/coap/src/main/resources/tb-coap-transport.yml
  2. 8
      transport/http/src/main/resources/tb-http-transport.yml
  3. 8
      transport/lwm2m/src/main/resources/tb-lwm2m-transport.yml
  4. 8
      transport/mqtt/src/main/resources/tb-mqtt-transport.yml
  5. 8
      transport/snmp/src/main/resources/tb-snmp-transport.yml

8
transport/coap/src/main/resources/tb-coap-transport.yml

@ -151,6 +151,14 @@ transport:
inactivity_timeout: "${TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT:600000}"
# Interval of periodic check for expired sessions and report of the changes to session last activity time
report_timeout: "${TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT:3000}"
activity:
# This property specifies the strategy for reporting activity events within each reporting period.
# The accepted values are 'FIRST', 'LAST', 'FIRST_AND_LAST' and 'ALL'.
# <ul><li> 'FIRST': Only the first activity event in each reporting period is reported.</li>
# <li> 'LAST': Only the last activity event in the reporting period is reported.</li>
# <li> 'FIRST_AND_LAST': Both the first and last activity events in the reporting period are reported.</li>
# <li> 'ALL': All activity events in the reporting period are reported.</li></ul>
reporting_strategy: "${TB_TRANSPORT_ACTIVITY_REPORTING_STRATEGY:LAST}"
json:
# Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON
type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:true}"

8
transport/http/src/main/resources/tb-http-transport.yml

@ -183,6 +183,14 @@ transport:
inactivity_timeout: "${TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT:600000}"
# Interval of periodic check for expired sessions and report of the changes to session last activity time
report_timeout: "${TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT:3000}"
activity:
# This property specifies the strategy for reporting activity events within each reporting period.
# The accepted values are 'FIRST', 'LAST', 'FIRST_AND_LAST' and 'ALL'.
# <ul><li> 'FIRST': Only the first activity event in each reporting period is reported.</li>
# <li> 'LAST': Only the last activity event in the reporting period is reported.</li>
# <li> 'FIRST_AND_LAST': Both the first and last activity events in the reporting period are reported.</li>
# <li> 'ALL': All activity events in the reporting period are reported.</li></ul>
reporting_strategy: "${TB_TRANSPORT_ACTIVITY_REPORTING_STRATEGY:LAST}"
json:
# Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON
type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:true}"

8
transport/lwm2m/src/main/resources/tb-lwm2m-transport.yml

@ -143,6 +143,14 @@ transport:
inactivity_timeout: "${TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT:600000}"
# Interval of periodic check for expired sessions and report of the changes to session last activity time
report_timeout: "${TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT:3000}"
activity:
# This property specifies the strategy for reporting activity events within each reporting period.
# The accepted values are 'FIRST', 'LAST', 'FIRST_AND_LAST' and 'ALL'.
# <ul><li> 'FIRST': Only the first activity event in each reporting period is reported.</li>
# <li> 'LAST': Only the last activity event in the reporting period is reported.</li>
# <li> 'FIRST_AND_LAST': Both the first and last activity events in the reporting period are reported.</li>
# <li> 'ALL': All activity events in the reporting period are reported.</li></ul>
reporting_strategy: "${TB_TRANSPORT_ACTIVITY_REPORTING_STRATEGY:LAST}"
json:
# Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON
type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:false}"

8
transport/mqtt/src/main/resources/tb-mqtt-transport.yml

@ -206,6 +206,14 @@ transport:
inactivity_timeout: "${TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT:600000}"
# Interval of periodic check for expired sessions and report of the changes to session last activity time
report_timeout: "${TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT:3000}"
activity:
# This property specifies the strategy for reporting activity events within each reporting period.
# The accepted values are 'FIRST', 'LAST', 'FIRST_AND_LAST' and 'ALL'.
# <ul><li> 'FIRST': Only the first activity event in each reporting period is reported.</li>
# <li> 'LAST': Only the last activity event in the reporting period is reported.</li>
# <li> 'FIRST_AND_LAST': Both the first and last activity events in the reporting period are reported.</li>
# <li> 'ALL': All activity events in the reporting period are reported.</li></ul>
reporting_strategy: "${TB_TRANSPORT_ACTIVITY_REPORTING_STRATEGY:LAST}"
json:
# Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON
type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:true}"

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

@ -164,6 +164,14 @@ transport:
inactivity_timeout: "${TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT:600000}"
# Interval of periodic check for expired sessions and report of the changes to session last activity time
report_timeout: "${TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT:3000}"
activity:
# This property specifies the strategy for reporting activity events within each reporting period.
# The accepted values are 'FIRST', 'LAST', 'FIRST_AND_LAST' and 'ALL'.
# <ul><li> 'FIRST': Only the first activity event in each reporting period is reported.</li>
# <li> 'LAST': Only the last activity event in the reporting period is reported.</li>
# <li> 'FIRST_AND_LAST': Both the first and last activity events in the reporting period are reported.</li>
# <li> 'ALL': All activity events in the reporting period are reported.</li></ul>
reporting_strategy: "${TB_TRANSPORT_ACTIVITY_REPORTING_STRATEGY:LAST}"
json:
# Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON
type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:true}"

Loading…
Cancel
Save