From e36db68d4dee66b7c77557ab0df1a3822ca8939a Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 11 Apr 2022 16:17:02 +0300 Subject: [PATCH] fix init Signed-off-by: Vasiliy Tolstov --- grpc.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/grpc.go b/grpc.go index 2945133..663506d 100644 --- a/grpc.go +++ b/grpc.go @@ -585,9 +585,6 @@ func (g *grpcServer) Options() server.Options { } func (g *grpcServer) Init(opts ...server.Option) error { - if len(opts) == 0 { - return nil - } return g.configure(opts...) } @@ -719,6 +716,7 @@ func (g *grpcServer) Register() error { } opts = append(opts, broker.SubscribeContext(subCtx)) opts = append(opts, broker.SubscribeAutoAck(sb.Options().AutoAck)) + opts = append(opts, broker.SubscribeBodyOnly(sb.Options().BodyOnly)) if config.Logger.V(logger.InfoLevel) { config.Logger.Infof(config.Context, "Subscribing to topic: %s", sb.Topic()) -- 2.45.2