edgexfoundry / app-functions-sdk-go

Owner: Applications WG
Apache License 2.0
43 stars 83 forks source link

Return early if no pipelines found #1614

Open FelixTing opened 2 months ago

FelixTing commented 2 months ago

https://github.com/edgexfoundry/app-functions-sdk-go/blob/08356014edfee7ee176874866367bbec6b48d8be/internal/app/triggermessageprocessor.go#L102-L176

In the method MssageReceived within the ‎triggerMessageProcessor implementation, if no pipelines are found for the received topic, it would be more efficient to return early to avoid unnecessary allocations, message decoding, and WaitGroup usage.