skroutz / rafka

Kafka proxy with a simple API, speaking the Redis protocol
https://engineering.skroutz.gr/blog/kafka-rails-integration/
GNU General Public License v3.0
8 stars 0 forks source link

Make Client responsible for closing its conn #38

Closed agis closed 7 years ago

agis commented 7 years ago

Prior to this, closing the client's connection was done as a separate step, outside of client.Close(). Making this the job of Client, which already knows about its underlying connection, makes sense considering that Client is a higher-level abstraction that includes a connection in its internal state.

This keeps the order of the closing sequence the same as before: first consumers/producers are closed and then the underlying client connection is closed (deferred functions are executed in a LIFO manner).

Closes #36.

agis commented 7 years ago

Merged: https://github.com/skroutz/rafka/commit/2dcf24cef34f9efe42855849e07e99dd90124028