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

kafka auto reset earlier did not work #1197

Closed
bogdan-dubyk opened this issue Sep 3, 2021 · 1 comment
Closed

kafka auto reset earlier did not work #1197

bogdan-dubyk opened this issue Sep 3, 2021 · 1 comment
Labels

Comments

@bogdan-dubyk
Copy link

As far as I know by default topic. auto.offset.reset is set to latest (correct me if I'm wrong), and with such a configuration if consumer is not listening when event dispatched, that event will be lost for a consumer, and if I understand correctly it can be changes by setting up auto.offset.reset to earliest, which i did in my local docker environment to test if it'll work.

So at the beginning I have default configuration (with offset latest) and I'm:

  1. dispatching event
  2. running bin/console messenger:consume {transprot_name}
    and as expected I did not get the message because offset is latest and at the moment of sending consumer was offline.

Now I'm want change offset ot earliest:

  1. As I'm on a docker env. and to be sure offset is not set somewhere in kafka, I'm removing kafka/zookeper containers and related volumes
  2. adding
      topic:
        auto.offset.reset: earliest

to my enqueue.yaml

  1. building kafka/zookeper container and run them
  2. dispatching event again
  3. running bin/console messenger:consume {transprot_name} afterwards again and still message is not processed by consumer

I have another project on Laravel where I did same manipulations, but except of setting auto.offset.reset to the topic section in laravel it goes to global section, and all works fine after I'm setting it earliest, consumer able to process events from the past.

What I'm doing wrong, why I can't change offset to earliest on symfony/enqueue.

Thanks a lot!

I'm using:

  • PHP8
  • Symfony 5.2
  • enqueue/rdkafka 0.10.9
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 16, 2022
@stale stale bot closed this as completed Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant