diff --git a/Attribution.txt b/Attribution.txt index cb029c67..42789ff9 100644 --- a/Attribution.txt +++ b/Attribution.txt @@ -203,3 +203,9 @@ https://github.com/nats-io/nkeys/blob/master/LICENSE github.com/nats-io/nuid (Apache-2.0) https://github.com/nats-io/nuid https://github.com/nats-io/nuid/blob/master/LICENSE + +golang.org/x/mod (BSD-3) https://github.com/golang/mod +https://github.com/golang/mod/blob/master/LICENSE + +golang.org/x/tools (BSD-3) https://github.com/golang/tools +https://github.com/golang/tools/blob/master/LICENSE \ No newline at end of file diff --git a/go.mod b/go.mod index 77c3aa53..1962945e 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/edgexfoundry/app-service-configurable go 1.18 -require github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.29 +require github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.31 require ( github.com/Microsoft/go-winio v0.6.0 // indirect @@ -10,10 +10,10 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/diegoholiveira/jsonlogic/v3 v3.2.7 // indirect github.com/eclipse/paho.mqtt.golang v1.4.2 // indirect - github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.22 // indirect + github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.24 // indirect github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.3 // indirect - github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.10 // indirect - github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7 // indirect + github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.14 // indirect + github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.9 // indirect github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3 // indirect github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.7 // indirect github.com/fatih/color v1.9.0 // indirect diff --git a/go.sum b/go.sum index e1554a46..d7162449 100644 --- a/go.sum +++ b/go.sum @@ -28,16 +28,16 @@ github.com/diegoholiveira/jsonlogic/v3 v3.2.7 h1:awX07pFPnlntZzRNBcO4a2Ivxa77NMt github.com/diegoholiveira/jsonlogic/v3 v3.2.7/go.mod h1:9oE8z9G+0OMxOoLHF3fhek3KuqD5CBqM0B6XFL08MSg= github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4= github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA= -github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.29 h1:9Qtfvkk5NRPfMpjg1emn98g/JnTjqC9MFrCNasJdmhY= -github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.29/go.mod h1:pYkbsBEQP2JXFo1QXyxUGpXJK+KTaqMNEOmSQaexV0o= -github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.22 h1:DrtTbcDU6VMoMmsAn9tQpxQ+MIwgtSBmSwuZLgFuDEQ= -github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.22/go.mod h1:rVklwwUju+/MGOij+KJeBJZ+/HIo6YsQwlFv7UmsA+8= +github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.31 h1:hivdzLAGSlzE+pBHjPrKtw0R6F9Sj5gL9vknEHKreKY= +github.com/edgexfoundry/app-functions-sdk-go/v3 v3.0.0-dev.31/go.mod h1:AZvJxuxhvwUuV/UIZTE0sb2/ydB7wFtn1ywTd789irI= +github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.24 h1:H9MC0ahbkMw4w1SHeX6/GVR5tC6E+Bz6ZiPECmnzO3c= +github.com/edgexfoundry/go-mod-bootstrap/v3 v3.0.0-dev.24/go.mod h1:iv/czxi4ciFWMgrO+3nnanGfkT2X1QW5L3iCb+deewk= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.3 h1:0Ew4PzLSFJ+sb7AYtvb9m1mRN45Sh0ELU1HdMCel5t8= github.com/edgexfoundry/go-mod-configuration/v3 v3.0.0-dev.3/go.mod h1:ESOWI4GokQfQ3Bn2hGsdfOVx5idj7QEdCPT/SAQDd9M= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.10 h1:o5yenvmLn8+0AOz0d5GIek011Tt5ZRbvPlgE4VhozEU= -github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.10/go.mod h1:4lpZUM54ZareGU/yuAJvLEw0BoJ43SvCj1LO+gsKm9c= -github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7 h1:jgDQA/7SENURXQkIX11pNgA/pX9IK9ZULenj/vF17Vw= -github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.7/go.mod h1:r6Klfz+QBDx1Z5UV0z70MKdK2/cgHwhtqTm2HFXoWug= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.14 h1:o7CFEIyKn/quin5lrAlUbUu9x1dnecK0tZs5waLhdCc= +github.com/edgexfoundry/go-mod-core-contracts/v3 v3.0.0-dev.14/go.mod h1:4lpZUM54ZareGU/yuAJvLEw0BoJ43SvCj1LO+gsKm9c= +github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.9 h1:CUUieXQ8roD4M770GXj1he707V3V9Jiygk302+dwvKk= +github.com/edgexfoundry/go-mod-messaging/v3 v3.0.0-dev.9/go.mod h1:iKBxmZkc7jdOrT99+IR1nyg7PlRgooAQMhZxDh2mTUQ= github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3 h1:QgZF9f70Cwpvkjw3tP1aiVGHc+yNFJNzW6hO8pDs3fg= github.com/edgexfoundry/go-mod-registry/v3 v3.0.0-dev.3/go.mod h1:2w8v0sv+i21nY+DY6JV4PFxsNTuxpGAjlNFlFMTfZkk= github.com/edgexfoundry/go-mod-secrets/v3 v3.0.0-dev.7 h1:9Mn389IHlgoPgGUpwnLzoe/shylkQI+nXI3E/AfnYDA= diff --git a/res/external-mqtt-trigger/configuration.toml b/res/external-mqtt-trigger/configuration.toml index 3da64dbe..48a57e09 100644 --- a/res/external-mqtt-trigger/configuration.toml +++ b/res/external-mqtt-trigger/configuration.toml @@ -36,11 +36,11 @@ Disabled = true [Trigger] Type="external-mqtt" +SubscribeTopics="external-request/#" +PublishTopic="" # optional if publishing response back to the the External MQTT Broker [Trigger.ExternalMqtt] Url = "tcp://localhost:1883" # fully qualified URL to connect to the MQTT broker - SubscribeTopics="external-request/#" - PublishTopic="" # optional if publishing response back to the the External MQTT Broker - ClientId = "external-mqtt-trigger" + ClientId = "external-mqtt-trigger" ConnectTimeout = "5s" # 5 seconds AutoReconnect = true KeepAlive = 10 # Seconds (must be 2 or greater) diff --git a/res/http-export/configuration.toml b/res/http-export/configuration.toml index e6f7930b..ea821651 100644 --- a/res/http-export/configuration.toml +++ b/res/http-export/configuration.toml @@ -83,8 +83,8 @@ Port = 59704 StartupMsg = "app-http-export has Started" [MessageBus] - [MessageBus.Topics] - SubscribeTopics = "edgex/events/#" [MessageBus.Optional] # Default MQTT Specific options that need to be here to enable evnironment variable overrides of them ClientId ="app-http-export" + +# Using default Trigger config from common config \ No newline at end of file diff --git a/res/metrics-influxdb/configuration.toml b/res/metrics-influxdb/configuration.toml index 7b77f5aa..13cb94f8 100644 --- a/res/metrics-influxdb/configuration.toml +++ b/res/metrics-influxdb/configuration.toml @@ -38,8 +38,10 @@ Port = 59707 StartupMsg = "app-metrics-influxdb has Started" [MessageBus] - [MessageBus.Topics] - SubscribeTopics = "edgex/telemetry/#" [MessageBus.Optional] # Default MQTT Specific options that need to be here to enable evnironment variable overrides of them ClientId ="app-metrics-influxdb" + +[Trigger] +# Note that the MessageBus connection above is used by edgex-messagebus trigger which is the default set in common config +SubscribeTopics = "telemetry/#" # Base topic is prepened to this topic when using edgex-messagebus diff --git a/res/mqtt-export/configuration.toml b/res/mqtt-export/configuration.toml index 6003c49e..14983e01 100644 --- a/res/mqtt-export/configuration.toml +++ b/res/mqtt-export/configuration.toml @@ -75,8 +75,8 @@ Port = 59703 StartupMsg = "app-mqtt-export has Started" [MessageBus] - [MessageBus.Topics] - SubscribeTopics = "edgex/events/#" [MessageBus.Optional] # Default MQTT Specific options that need to be here to enable evnironment variable overrides of them - ClientId ="app-mqtt-export" \ No newline at end of file + ClientId ="app-mqtt-export" + +# Using default Trigger config from common config \ No newline at end of file diff --git a/res/rules-engine/configuration.toml b/res/rules-engine/configuration.toml index ae6bf497..160038d9 100644 --- a/res/rules-engine/configuration.toml +++ b/res/rules-engine/configuration.toml @@ -30,9 +30,11 @@ Port = 59701 StartupMsg = "app-rules-engine has Started" [MessageBus] - [MessageBus.Topics] - SubscribeTopics = "edgex/events/#" - PublishTopic="rules-events" [MessageBus.Optional] # Default MQTT Specific options that need to be here to enable evnironment variable overrides of them ClientId ="app-rules-engine" + +[Trigger] +# Note that the MessageBus connection above is used by edgex-messagebus trigger which is the default set in common config +# Default value for SubscribeTopics is aslo set in common config +PublishTopic="rules-events" # Base topic is prepened to this topic when using edgex-messagebus diff --git a/res/sample/configuration.toml b/res/sample/configuration.toml index 66399820..086d89e3 100644 --- a/res/sample/configuration.toml +++ b/res/sample/configuration.toml @@ -17,11 +17,11 @@ LogLevel = "INFO" [Writable.Pipeline.PerTopicPipelines] [Writable.Pipeline.PerTopicPipelines.float] Id = "float-pipeline" - Topics = "edgex/events/device/+/Random-Float-Device/#" + Topics = "events/device/device-virtual/Random-Float-Device/#" ExecutionOrder = "TransformJson, SetResponseData" [Writable.Pipeline.PerTopicPipelines.int8-16] Id = "int8-16-pipeline" - Topics = "edgex/events/device/+/+/Int8, edgex/events/device/+/+/Int16" + Topics = "events/device/device-virtual/+/+/Int8, events/device/device-virtual/+/+/Int16" ExecutionOrder = "TransformXml, SetResponseData" # The Pipeline.Functions sections define the parameter configuration for each specific function. @@ -162,10 +162,6 @@ StartupMsg = "app-sample has Started" # Only valid if MessageBus Trigger is used # If prefer REST, remove below and uncomment above UseMessageBus = true - [Clients.core-command.Topics] - CommandQueryRequestTopicPrefix = "edgex/core/commandquery/request" - CommandRequestTopicPrefix = "edgex/core/command/request" - ResponseTopicPrefix = "edgex/response" # Used for Notification and Subscription client, which are not currently used by any configurable functions [Clients.support-notifications] @@ -175,9 +171,11 @@ StartupMsg = "app-sample has Started" [MessageBus] Disabled = false # Set to true if not using edgex-messagebus Trigger below and don't want Metrics or Commands via MessageBus - [MessageBus.Topics] - SubscribeTopics = "edgex/events/#" - PublishTopic="sample" [MessageBus.Optional] # Default MQTT Specific options that need to be here to enable evnironment variable overrides of them ClientId ="app-sample" + +[Trigger] +# Note that the MessageBus connection above is used by edgex-messagebus trigger which is the default set in common config +# Default value for SubscribeTopics is aslo set in common config +PublishTopic="sample" # Base topic is prepened to this topic when using edgex-messagebus