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

Try one off time based consumer #338

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deepredsky
Copy link
Contributor

@deepredsky deepredsky commented May 30, 2023

example

require 'time'
from = Time.parse('2023-05-25 13:55:08 +0200')
to = Time.parse('2023-05-25 13:55:10 +0200')

TimePeriodConsumer
  .new(brokers: ['localhost:9092'], group_id: 'test-ruby-group')
  .consume(topic: 'messages', from: from, to: to) do |msg|
    puts 'Received msg'
    pp msg
  end

@mensfeld
Copy link

FYI I am going to merge this karafka/rdkafka-ruby#229 into the next release (not the current 0.13.0 but next not to add complexity to the current changes in rdkafka)

@deepredsky
Copy link
Contributor Author

FYI I am going to merge this appsignal/rdkafka-ruby#229 into the next release (not the current 0.13.0 but next not to add complexity to the current changes in rdkafka)

Thanks @mensfeld, i will test and experiment with this more when that feature is released

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

Successfully merging this pull request may close these issues.

2 participants