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

In C++ partitioned consumer, do not append partition index in subscription name #836

Merged
merged 3 commits into from
Oct 24, 2017

Conversation

merlimat
Copy link
Contributor

Motivation

As described in #827, the C++ partitioned consumer is appending the partition id to the subscription name, unlike the Java partitioned consumer. That breaks the assumptions made by many tools and APIs to associate the same subscription id across all the partitions (eg: unsubscribe a subscription from all partitions at once).

Modifications

Make C++ client to use the same convention as Java client in this case.

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Oct 17, 2017
@merlimat merlimat added this to the 1.21.0-incubating milestone Oct 17, 2017
@merlimat merlimat self-assigned this Oct 17, 2017
@jai1
Copy link
Contributor

jai1 commented Oct 17, 2017

LGTM, but will cause the ppl using the old client to lose messages on the incorrect subscription name.

@merlimat
Copy link
Contributor Author

LGTM, but will cause the ppl using the old client to lose messages on the incorrect subscription name.

That's correct, though the idea is to fix it before anyone starts using it

Copy link
Contributor

@yush1ga yush1ga left a comment

Choose a reason for hiding this comment

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

LGTM

@jai1
Copy link
Contributor

jai1 commented Oct 18, 2017

retest this please

Copy link
Contributor

@saandrews saandrews left a comment

Choose a reason for hiding this comment

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

👍 Looks good. I hope none of our test is looking for subs in the old format.

ASSERT_FALSE(res != 204 && res != 409);

Consumer partitionedConsumer;
Result result = client.subscribe(topicName, "subscription-A", consumer);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the variable name consumer (not partitionedConsumer) correct?

@massakam
Copy link
Contributor

retest this please

@massakam
Copy link
Contributor

massakam commented Oct 23, 2017

👍

@merlimat merlimat merged commit a5b5659 into apache:master Oct 24, 2017
@merlimat merlimat deleted the fix-c++-partitioned-consumer branch October 24, 2017 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants