From a34c33e25b16343d8d8455356f9fc2c3102565a2 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 24 Aug 2023 09:25:03 +0300 Subject: [PATCH] fix server subscriber Signed-off-by: Vasiliy Tolstov --- requestid.go | 1 + 1 file changed, 1 insertion(+) diff --git a/requestid.go b/requestid.go index 88209f9..005b45a 100644 --- a/requestid.go +++ b/requestid.go @@ -122,6 +122,7 @@ func NewServerSubscriberWrapper() server.SubscriberWrapper { if id, ok := msg.Header()[DefaultMetadataKey]; ok { imd.Set(DefaultMetadataKey, id) omd.Set(DefaultMetadataKey, id) + ctx = context.WithValue(ctx, XRequestIDKey, id) ctx = metadata.NewIncomingContext(ctx, imd) ctx = metadata.NewOutgoingContext(ctx, omd) } else if ctx, err = DefaultMetadataFunc(ctx); err != nil {