pass additional context for broker subscribe (#1105)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-01-10 18:04:15 +03:00 committed by Asim Aslam
parent 32a2005f6d
commit f4fb923fb2

View File

@ -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())
}