ConsumerReplicas sets the number of replica count for a consumer.
(replicas int)
| 2793 | |
| 2794 | // ConsumerReplicas sets the number of replica count for a consumer. |
| 2795 | func ConsumerReplicas(replicas int) SubOpt { |
| 2796 | return subOptFn(func(opts *subOpts) error { |
| 2797 | if replicas < 1 { |
| 2798 | return fmt.Errorf("invalid ConsumerReplicas value (%v), needs to be greater than 0", replicas) |
| 2799 | } |
| 2800 | opts.cfg.Replicas = replicas |
| 2801 | return nil |
| 2802 | }) |
| 2803 | } |
| 2804 | |
| 2805 | // ConsumerMemoryStorage sets the memory storage to true for a consumer. |
| 2806 | func ConsumerMemoryStorage() SubOpt { |