(b *Broker)
| 51 | } |
| 52 | |
| 53 | func safeAsyncClose(b *Broker) { |
| 54 | go withRecover(func() { |
| 55 | if connected, _ := b.Connected(); connected { |
| 56 | if err := b.Close(); err != nil { |
| 57 | Logger.Println("Error closing broker", b.ID(), ":", err) |
| 58 | } |
| 59 | } |
| 60 | }) |
| 61 | } |
| 62 | |
| 63 | // Encoder is a simple interface for any type that can be encoded as an array of bytes |
| 64 | // in order to be sent as the key or value of a Kafka message. Length() is provided as an |
no test coverage detected