This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
add Offset() to PartitionConsumer interface #221
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dim
suggested changes
Mar 7, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for this, could you please fix the naming? Thanks again!
partitions.go
Outdated
|
||
// Offset returns the offset used for creating the PartitionConsumer instance. | ||
// Offset can be a literal offset, or OffsetNewest, or OffsetOldest | ||
Offset() int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please rename this method to InitialOffset
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will do it.
OK. I fixed the naming. |
dim
approved these changes
Mar 16, 2018
Praveen-Upadhyay
added a commit
to ContinuumLLC/godep-bsm-sarama-cluster
that referenced
this pull request
May 9, 2018
* Return error instead of returning nil * Make Close idempotent * CI update * Auto-discover topics * fix test due to sarama's change in sync_producer's config * fix the doc for Consumer.Notifications * Bump deps * Add HighWaterMarks support ref: HighWaterMarks returns the current high water marks for each topic and partition https://godoc.org/github.com/Shopify/sarama#Consumer * Bump Sarama dependency, use latest Kafka version * Allow to stash offsets when processing batches * Added support method * Subscribe to new topics * Add troubleshooting information regarding consumer not receiving messages * Allow to subscribe to topics via regular expressions * Formatting * Fix troubleshooting formatting. * Added example * Handle authz limited to specific topics * express it a bit simpler * move metadata refresh to consumer method * Fix comparison operator * Allow custom group member UserData to be included when joining the group * Commit every time, even if not dirty. Updated README and CI config. * Updated example * Fix off by one error when marking offset * Updated README * Test with Kafka 0.9 * Partially revert bsm#117. Force-commit when Consumer.Offsets.Retention is set * Remove retention time workaround. Offset retention must be > than log retention. * Allow sarama-cluster offset synchronization dwell time to be configured separately from Sarama MaxProcessingTime * Fix typo and dwell time validation error handling * Remove sleep and replace with select statement. Switch from dwell time as pointer to value. * Switch sleep to select with speedy bailout on close * Better config validation * Ported from glide to dep * Fix CI * Fix CI * Ensure notifications are issued (and consumed) before rebalancing is completed * Fix CI * Bump patch version# * Simpler tests * Fix seeding * Test with Go 1.9 * Remove delay * Reduce memory requirements * Add consumer test * Force rebalance when partition consumers exit with an error * Adding notifications on rebalance start * Stop sharing clients as this is not something Kafka allows us to do * Expose individual partitions * Respond to feedback * Adding whitelist example * Addressing feedback. Always multiplex errors * Updated README * Allow to re-use clients * Adding comment to clarify usage * Update CI settings * Make Close thread-safe * More robust * Fix race, added clarifying comment to CommitOffsets * Fix deps * Fix the kafka source - 0.9.0.1 testing broken * Support Kafka 1.0 * Drain channels on Close * Allow marking of earlier offsets This commit is in alignment with the sarama library commits IBM/sarama@b966238#diff-3ca6d659defd100fe2de43adf2b8f41e IBM/sarama@96fa1c8#diff-3ca6d659defd100fe2de43adf2b8f41e * Address comments and add tests * Ensure we have random topic name and reduce time * Fix test timing for kafka ≥ 0.11.0 * Remove unncessary expect clause * Address comments + gofmt * Unify PartitionConsumer interface * New release * Fix NPE on ResetOffsets and MarkOffsets * Use correct request proto version * Expose offset methods on partition consumers * Fix/remove test * Bump CI config * Fewer builds * add Offset() to PartitionConsumer interface (bsm#221) * add Offset() to PartitionConsumer interface * rename Offset to InitialOffset
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes we need to know the initial offset of a PartitionConsumer