From 08fe30da4624e84a18d94145dd7986979419ef70 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 --- grpc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grpc.go b/grpc.go index 874f727..d2655a9 100644 --- a/grpc.go +++ b/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()) }