edgexfoundry / app-service-configurable

Owner: Applications WG
Apache License 2.0
18 stars 47 forks source link

Multiple application services required #487

Closed Rakshithakrishna2 closed 1 year ago

Rakshithakrishna2 commented 1 year ago

Hi all,

I am using EdgeX 2.0 version and device-sdk-c for my applications.

Just wanted to know, if there is a feature provided to have multiple application services for one device services.

NOTE: Application service that I am using is: MQTT

Kindly guide me. Thank you in advance.!

lenny-goodell commented 1 year ago
  • 1 application service to send sensor data.
  • 2 application service to send the image being captured

@Rakshithakrishna2 , when you say send sensor data and send the image being captured where are you sending the data? Exporting out of EdgeX to the Cloud?

NOTE: Application service that I am using is: MQTT

Do you mean using app-service-configurable with the mqtt-export profile?

Rakshithakrishna2 commented 1 year ago

@lenny-intel , The datas are sent to mosquitto broker, for that I am using application service's mqtt-export

The application is, application service-1 to be used to send data from one device-service. application service-2 to be used to send data from another device-service.

lenny-goodell commented 1 year ago

A single application service instance like app-service=configurable can have multiple function pipelines for handling (exporting) data from the two devices. This is done by creating two function pipelines with the Topics set so each only receives the Events from the specific devices. Here is the docs for doing this with app-service-configurable. https://docs.edgexfoundry.org/2.3/microservices/application/AppServiceConfigurable/#pipeline-per-topics

Note you will have to provide your custom configuration.toml file (volume mounted into the container) with your custom configurable pipeline.

You can also run two separate instances of app-service-configurable using the mqtt-export profile. Configure the service key for each to be unique using the EDGEX_SERVICE_KEY environment variable in the compose file for each. Then using environment variable override in the compose file customize the pipelines to filter for the specific device or device profile (if device name not known) and to export to the proper MQTT broker and topic. https://docs.edgexfoundry.org/2.3/microservices/application/AppServiceConfigurable/#environment-variable-overrides-for-docker

lenny-goodell commented 1 year ago

Closing due to no response in 2 months