fix server subscriber #103

Merged
vtolstov merged 1 commits from idfix into master 2023-08-24 09:32:35 +03:00
Showing only changes of commit a34c33e25b - Show all commits

View File

@ -122,6 +122,7 @@ func NewServerSubscriberWrapper() server.SubscriberWrapper {
if id, ok := msg.Header()[DefaultMetadataKey]; ok { if id, ok := msg.Header()[DefaultMetadataKey]; ok {
imd.Set(DefaultMetadataKey, id) imd.Set(DefaultMetadataKey, id)
omd.Set(DefaultMetadataKey, id) omd.Set(DefaultMetadataKey, id)
ctx = context.WithValue(ctx, XRequestIDKey, id)
ctx = metadata.NewIncomingContext(ctx, imd) ctx = metadata.NewIncomingContext(ctx, imd)
ctx = metadata.NewOutgoingContext(ctx, omd) ctx = metadata.NewOutgoingContext(ctx, omd)
} else if ctx, err = DefaultMetadataFunc(ctx); err != nil { } else if ctx, err = DefaultMetadataFunc(ctx); err != nil {