Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for Dialer.LookupPartition (#191)
* Fix lookup partition (#1) * Test against multiple Kafka versions * Message writer for record batches (#163) * Add branching for record batch writer * Make key and value from headers public * Add writeVarInt function * Implement writeRecord method * Write record batch method * Use zigzag encoding for varint * Drop logging * Add unit test for v2 record batch * Remove commented out code * Use int constants from math package * Use exact record size instead of extra buffer * Give a simpler name to calcVarIntLen * Move error check out of if else block * Extract message set size in a function * Give calcRecordSize a shorter name * Protect recordSize from confusing order of params * Use recordSize intead of estimatedRecordSize * Extract record batch size * Use record size from calculation * Assign offsets to messages in record batch * Write message set straight to output writer * Write record batch straight to output writer * Get rid of remainder buffer * Remove commented out code * Use bytes.Equal for comparing slices of bytes * Compress messages before calculating size * Run tests for kafka 0.10 (#187) Added a utility method to check broker version so that tests for newer functionality can be skipped. * fix * Fix memory leak in LookupPartition * Fix ReadPartitions
- Loading branch information