support partition consumer mode for kafka channel#879
Conversation
|
/ok-to-test |
28b05a0 to
add9b4a
Compare
|
The following is the coverage report on pkg/.
|
|
/lgtm nice idea. Perhaps we should change this to be the default behavior, in the future |
| } else { | ||
| break | ||
| if cluster.ConsumerModePartitions == d.kafkaCluster.GetConsumerMode() { | ||
| go d.partitionConsumerLoop(consumer, channelRef, sub) |
There was a problem hiding this comment.
thanks a lot, this looks easier to test now.
|
/lgtm |
grantr
left a comment
There was a problem hiding this comment.
@yuzisun Thanks, and thanks for writing unit tests! Did you verify this feature works in a real cluster? I'm not very familiar with the Kafka channel and there aren't any E2E tests yet, so I'd like to hear from at least one person who's seen this code work in real life 😀
Also, since this adds a feature to the Kafka channel config map, can you write a blurb about it in the Release Note block? Seems like it can be copied from your Proposed Changes list.
| "go.uber.org/zap" | ||
| "k8s.io/apimachinery/pkg/runtime" | ||
| _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" | ||
| "os" |
There was a problem hiding this comment.
Did you run gofmt on this file? I'd have expected it to put this import above next to flag.
There was a problem hiding this comment.
hmm I did run gofmt -w main.go, nothing changes, then I purposely put next to flag and rerun gofmt it puts os back after _ k8s.io/client-go/plugin/pkg/client/auth/gcp, looks weird. I am using go version go1.11.5 darwin/amd64
There was a problem hiding this comment.
weird! I don't know why it does that, but I guess it's correct by definition. So 👍
Added the release note. I did verify this in the real cluster and I can also look into adding a E2E test for kafka. |
grantr
left a comment
There was a problem hiding this comment.
Added the release note. I did verify this in the real cluster and I can also look into adding a E2E test for kafka.
Thanks! I took the liberty of moving the release note text into the ```releasenote block. E2E tests can be another PR.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: grantr, yuzisun The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
* support partition consumer for kafka channel * consolidate GetProvisionerConfig function * add consumer mode config test * address review comments
Fixes #693
Proposed Changes
consumer_modein kafka channel config, by default it is still doing multiplexing. Whenconsumer_modeis set topartitions, kafka dispatcher should start creating partition consumer for the channels and events are dispatched on different go channels for different partitions.Release Note