server: add SubscriberBodyOnly option
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
f7b5211af3
commit
8d7e442b3a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user