MCPcopy
hub / github.com/IBM/sarama / AsyncClose

Method AsyncClose

consumer.go:364–364  ·  view source on GitHub ↗

AsyncClose initiates a shutdown of the PartitionConsumer. This method will return immediately, after which you should continue to service the 'Messages' and 'Errors' channels until they are empty. It is required to call this function, or Close before a consumer object passes out of scope, as it will

()

Source from the content-addressed store, hash-verified

362 // function, or Close before a consumer object passes out of scope, as it will otherwise leak memory. You must call
363 // this before calling Close on the underlying client.
364 AsyncClose()
365
366 // Close stops the PartitionConsumer from fetching messages. It will initiate a shutdown just like AsyncClose, drain
367 // the Messages channel, harvest any errors & return them to the caller. Note that if you are continuing to service

Callers 6

closeProducerWithTimeoutFunction · 0.65
handleResponsesMethod · 0.65
CloseMethod · 0.65
consumeMethod · 0.65
mainFunction · 0.65
mainFunction · 0.65

Implementers 2

PartitionConsumermocks/consumer.go

Calls

no outgoing calls

Tested by 1

closeProducerWithTimeoutFunction · 0.52