From f4fb923fb2705b31a860fcb56f63ae30a450a50d Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Fri, 10 Jan 2020 18:04:15 +0300 Subject: [PATCH] pass additional context for broker subscribe (#1105) Signed-off-by: Vasiliy Tolstov --- server/grpc/grpc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/grpc/grpc.go b/server/grpc/grpc.go index 874f7273..d2655a95 100644 --- a/server/grpc/grpc.go +++ b/server/grpc/grpc.go @@ -645,6 +645,10 @@ func (g *grpcServer) Register() error { opts = append(opts, broker.Queue(queue)) } + if cx := sb.Options().Context; cx != nil { + opts = append(opts, broker.SubscribeContext(cx)) + } + if !sb.Options().AutoAck { opts = append(opts, broker.DisableAutoAck()) }