Skip to content

Commit

Permalink
fix: Fix MQTT Trigger to set ReceivedTopic (#910)
Browse files Browse the repository at this point in the history
closes #909

Signed-off-by: lenny <leonard.goodell@intel.com>
  • Loading branch information
Lenny Goodell authored Jun 23, 2021
1 parent ead6592 commit 5491d08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/trigger/mqtt/mqtt.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ import (
"context"
"errors"
"fmt"
"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"
"net/url"
"strings"
"sync"
"time"

"github.com/edgexfoundry/app-functions-sdk-go/v2/pkg/interfaces"

"github.com/edgexfoundry/app-functions-sdk-go/v2/internal/appfunction"
"github.com/edgexfoundry/app-functions-sdk-go/v2/internal/bootstrap/container"
"github.com/edgexfoundry/app-functions-sdk-go/v2/internal/runtime"
Expand Down Expand Up @@ -172,6 +173,7 @@ func (trigger *Trigger) messageHandler(client pahoMqtt.Client, message pahoMqtt.
CorrelationID: correlationID,
ContentType: contentType,
Payload: data,
ReceivedTopic: message.Topic(),
}

messageError := trigger.runtime.ProcessMessage(appContext, envelope)
Expand Down

0 comments on commit 5491d08

Please sign in to comment.