From a90681e18d10c3150f2ed5cfaf99b28a08c65a46 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 72f2593..e45fd44 100644 --- a/requestid.go +++ b/requestid.go @@ -123,6 +123,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 { -- 2.45.2