WallarooLabs / pony-kafka

:horse: Pure Pony Kafka client
Other
57 stars 4 forks source link

Make sure to send 0 and not -1 for message offset for wrapper message #40

Closed dipinhora closed 6 years ago

dipinhora commented 6 years ago

Prior to this commit, whenever we compressed a set of messages as a single wrapper message we would set the message offset to be -1. This wasn't an issue with Kafka Brokers < 0.11 but starting 0.11 the broker enforced that the message offset should be 0 or greater than 0.

This commit ensures the wrapper message always gets 0 for it's message offset since the broker will auto assign valid offsets based on the internally compressed message offsets.

resolves #39