AsyncClose triggers a shutdown of the producer. The shutdown has completed when both the Errors and Successes channels have been closed. When calling AsyncClose, you *must* continue to read from those channels in order to drain the results of any messages in flight.
()
| 40 | // AsyncClose, you *must* continue to read from those channels in order to |
| 41 | // drain the results of any messages in flight. |
| 42 | AsyncClose() |
| 43 | |
| 44 | // Close shuts down the producer and waits for any buffered messages to be |
| 45 | // flushed. You must call this function before a producer object passes out of |
no outgoing calls