diff --git a/server/options.go b/server/options.go index ff6b2543..0973a2ce 100644 --- a/server/options.go +++ b/server/options.go @@ -332,6 +332,7 @@ type SubscriberOptions struct { AutoAck bool Queue string Internal bool + BodyOnly bool Context context.Context } @@ -389,6 +390,20 @@ func SubscriberQueue(n string) SubscriberOption { } } +// SubscriberGroup sets the shared group name distributed messages across subscribers +func SubscriberGroup(n string) SubscriberOption { + return func(o *SubscriberOptions) { + o.Queue = n + } +} + +// SubscriberBodyOnly says broker that message contains raw data with absence of micro broker.Message format +func SubscriberBodyOnly(b bool) SubscriberOption { + return func(o *SubscriberOptions) { + o.BodyOnly = b + } +} + // SubscriberContext set context options to allow broker SubscriberOption passed func SubscriberContext(ctx context.Context) SubscriberOption { return func(o *SubscriberOptions) {