Skip to content

Commit

Permalink
Forwarder: propagate the enveloped message's Context (#387)
Browse files Browse the repository at this point in the history
This may be useful if the Forwarder's router middleware changes the
Context in some way.
  • Loading branch information
m110 authored Sep 5, 2023
1 parent e27d719 commit 4f3079b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/forwarder/envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func unwrapMessageFromEnvelope(msg *message.Message) (destinationTopic string, u

watermillMessage := message.NewMessage(envelopedMsg.UUID, envelopedMsg.Payload)
watermillMessage.Metadata = envelopedMsg.Metadata
watermillMessage.SetContext(msg.Context())

return envelopedMsg.DestinationTopic, watermillMessage, nil
}

0 comments on commit 4f3079b

Please sign in to comment.