Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: support initialisation of producer without topic for kafka, azure event hub and confluent cloud #2569
feat: support initialisation of producer without topic for kafka, azure event hub and confluent cloud #2569
Changes from 27 commits
fcaf5a1
9441ece
d4bf244
e9b0eca
5ea13e8
c34af41
3ae40f7
98b80bd
cf618c7
57f2257
e2d4428
b28df76
476c1b3
709a66d
8664e2a
eef6bd4
c8fb9cd
b0c22d1
78f24d8
f6acf0f
91abb1a
7fe1e6a
f66e8e9
aa9d7e2
560fa4e
4504a55
9f7e642
eeb8667
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
client.Producer
should know if it has been initialized with a topic or not and only include the message's topic in the latter case.Additionally, this function should return an error if the producer is not initialized with a topic and no topic is included in at least one of the messages.
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.
We plan to go with the approach where we always initialize the producer without client and we intend to always send each message with topic information. That proper assignment of topic to each message would be handled at transformer
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.
Given that we decided to go down this road, can you please make it mandatory and raise an error here if the topic is empty?
I think we should also have a test for this (don't specify topic and check that an error is returned).
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.
Instead of passing the
defaultTopic
around, an alternative approach is to use the existing pattern of including such information in theproducerManager
:That should be preferred given that it is already in place. I've attached a git diff for you to consider this approach (e.g.
git apply yourcoworkers.diff
).kafka.diff.zip
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.
Can we take this up in the next iteration of enhancement I can create a backlog item in our board for this. The reason I am asking is I need to update and add some test cases for this approach as we are dangerously close to release this might take more time :/
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.
Sure no problem 👍