-
Notifications
You must be signed in to change notification settings - Fork 452
Auto create topics producer #215
base: master
Are you sure you want to change the base?
Conversation
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.
@Sevavietl thanks for your contribution!
Could you please add some functional tests to cover the auto creation? From my little knowledge about Kafka I don't think that these changes are enough to support that feature.
|
||
/** | ||
* @doesNotPerformAssertions | ||
* @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessDocComment |
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.
Please don't suppress CS violations
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.
I took it from the test above
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.
Ohh I get it, it's because we're using an old version of doctrine/coding-standard
. Let's keep it for now and I created #216 to handle that. Thanks!
@lcobucci, I don't think functional tests needed, because my code doesn't manage actual Kafka settings (or saves the user from setting the wrong option). It simply ensures that you can acknowledge producer about auto topics creation, so that this check can pass (
Now it doesn't respects kafka broker option |
@Sevavietl alright but we still need to ensure that the library works with that configuration enabled? Also how the library should behave when We have a huge issue in this library: we're doing many local tests but not adding them to the build and then we can't ensure that all edge cases will still work regardless of the changes we make. |
@lcobucci, I agree that tests needed. If I understand correctly, configuring the Kafka itself is out of scope this library. So the only thing we can test in functional tests is the behavior: From what I see in the docs of image used in tests:
So for this particular test case there will be separate container (or even one container per each kafka version). Does this looks ok to you? I would appretiate a direction, because as I said I am not a docker expert. Thank you in advance. |
@Sevavietl no worries, you're not alone 👍 I think that using a |
Thank you for the great library.
As it was mentioned in this issue it would be nice to be able to set topic creation option to be in line with
auto.create.topics.enable
broker option. According to docs the default option istrue
, so I added this toKafka\Config
.Thank you in advance.