Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consumer.offsetsForTimes - consider using Instant as query types instead of Offset #123

Open
nikitapecasa opened this issue Apr 10, 2021 · 0 comments

Comments

@nikitapecasa
Copy link
Contributor

Currently it's defined as

def offsetsForTimes(timestampsToSearch: Map[TopicPartition, Offset]): F[Map[TopicPartition, Option[OffsetAndTimestamp]]]

while working on #122 we agreed with @t3hnar to have following method def for new RebalanceCallback API

def offsetsForTimes[F[_]](
    timestampsToSearch: Nem[TopicPartition, Instant]
  ): RebalanceCallback[F, Map[TopicPartition, Option[OffsetAndTimestamp]]]

The diff is

  • usage of Instant instead of Offset
  • usage of NonEmptyMap instead of regular scala Map (which can be empty)

The same can be applied to corresponding Consumer methods

  • offsetsForTimes
  • offsetsForTimes with timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant