motornet
motornet copied to clipboard
Safely close Kafka consumer
Fixes #1283
Calling both Dispose() and Close() on a consumer will yield an exception that the inner handler has already been disposed. Since there are two possible ways a KafkaMessageConsumer can be stopped, I migrated both of them to call a safe CloseOrDispose() method.