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

Multiple kafka broker connections #210

Closed

Conversation

stefanovik
Copy link

Hello,

Created a way to configure multiple kafka broker connections, particularly because we've run into a situation where we needed to connect to kafka brokers hosted on our own servers and kafka brokers from Amazon MSK, so we needed this duality.

Copy link
Owner

@mateusjunges mateusjunges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks for your work on this. I have some considerations I'd like you to take a look.

I think a better syntax for this would be to add a new method called connection, that let's you specify with which connection you want to work with, instead of adding this feature to the default consumer command only.

Something like this:

Kafka::connection('your-connection-name')->publishOn(...)

src/Console/Commands/KafkaConsumerCommand.php Outdated Show resolved Hide resolved
src/Console/Commands/KafkaConsumerCommand.php Outdated Show resolved Hide resolved
@SergkeiM
Copy link
Contributor

Hi @stefanovik @mateusjunges

Added a PR for requested changes by @mateusjunges https://github.com/stefanovik/laravel-kafka/pull/1/files

@stefanovik
Copy link
Author

stefanovik commented Aug 29, 2023

HI @SergkeiM, looking at them right now.

Edit: Merged it, thanks a lot! @mateusjunges do you find the changes in line with what you'd thought?

@mateusjunges mateusjunges changed the base branch from v1.13.x to v2.x October 24, 2023 13:10
@mateusjunges
Copy link
Owner

Closing this as I don't think this is the best implementation for this feature. I'll think about it a bit and come up with a better API. Thanks for taking the time to implement it tho ❤️

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.

4 participants