Close terminates the current generation by causing this member to leave and releases all local resources used to participate in the consumer group. Close will also end the current generation if it is still active.
()
| 683 | // releases all local resources used to participate in the consumer group. |
| 684 | // Close will also end the current generation if it is still active. |
| 685 | func (cg *ConsumerGroup) Close() error { |
| 686 | cg.closeOnce.Do(func() { |
| 687 | close(cg.done) |
| 688 | }) |
| 689 | cg.wg.Wait() |
| 690 | return nil |
| 691 | } |
| 692 | |
| 693 | // Next waits for the next consumer group generation. There will never be two |
| 694 | // active generations. Next will never return a new generation until the |
no outgoing calls