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

[v1.8.x] Add restart command #119

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

gajosu
Copy link
Contributor

@gajosu gajosu commented Jul 18, 2022

This is a proposal to have the possibility to restart consumer processes by means of an Artisan command

Changes

  • New comand kafka:restart-consumers
    When this command is executed, a key cache called laravel-kafka:consumer:restart is created with the current date in timestamp format, the kafka process checks the cache every 1 second (you can define the interval in milliseconds in the Config class), when the timestamp is different from the last restart the loop stops.

Feel free to send your suggestions

@gajosu gajosu closed this Jul 30, 2022
@mateusjunges
Copy link
Owner

Hey @gajosu didn't have time to review this one. You can reopen if you want, I'll review all pending PRs on my open source projects tomorrow. Thanks!

@gajosu
Copy link
Contributor Author

gajosu commented Aug 1, 2022

Hey @gajosu didn't have time to review this one. You can reopen if you want, I'll review all pending PRs on my open source projects tomorrow. Thanks!

Sure

@gajosu gajosu reopened this Aug 1, 2022
@mateusjunges
Copy link
Owner

Hey @gajosu I've just tested it here, and when I have my consumer running as a Laravel Command, I call kafka:restart and the command just stops. Since the command is called restart, isn't it supposed to start again? I think the only way the consumer will start again is if it's running via supervisor, and that's fine for me, I just want to confirm with you first.

@gajosu
Copy link
Contributor Author

gajosu commented Aug 2, 2022

yes the loop just stops, just like laravel queues, the queue:restart command stops the loop and supervisor needs to restart it

@mateusjunges
Copy link
Owner

Ok, thanks.

@mateusjunges mateusjunges merged commit 4822d37 into mateusjunges:v1.8.x Aug 2, 2022
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