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
parent 74e52bdb3e
commit 08fe30da46

View File

@ -645,6 +645,10 @@ func (g *grpcServer) Register() error {
opts = append(opts, broker.Queue(queue)) opts = append(opts, broker.Queue(queue))
} }
if cx := sb.Options().Context; cx != nil {
opts = append(opts, broker.SubscribeContext(cx))
}
if !sb.Options().AutoAck { if !sb.Options().AutoAck {
opts = append(opts, broker.DisableAutoAck()) opts = append(opts, broker.DisableAutoAck())
} }