-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Conversation
…nnections as the consumer
…th array and string types for broker and for the consumer we should also treat the case when we don't have the broker connection specified and it's an array of brokers
…meter, similar to how databases/mail/etc. work in laravel
…n have different connection parameters as well
…e connection provided
There was a problem hiding this 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(...)
Added a PR for requested changes by @mateusjunges https://github.com/stefanovik/laravel-kafka/pull/1/files |
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? |
Request changes
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 ❤️ |
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.