Skip to content

Conversation

@RobertIndie
Copy link
Member

@RobertIndie RobertIndie commented Feb 24, 2022

Master Issue: #13408

Motivation

In #13355, we added support for creating initial subscription when creating the producer. But the broker didn't check if the subscription can be created automatically. The initial subscription will be created even if the allowAutoSubscriptionCreation is disabled.

Modifications

  • Check allowAutoSubscriptionCreation when creating the initial subscription.

Verifying this change

This change is already covered by existing tests, such as testInitialSubscriptionCreationWithAutoCreationDisable.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

  • doc

Motivation
In apache#13355, we added support for creating initial subscription when creating the producer. But the broker didn't check if the subscription can be created automatically. The initial subscription will be created even if the `allowAutoSubscriptionCreation` is disabled.

Modification
* Check `allowAutoSubscriptionCreation` when creating the initial subscription.

Signed-off-by: Zike Yang <[email protected]>
@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Feb 24, 2022
@michaeljmarshall
Copy link
Member

@codelipenghui - this seems like a missing component for PIP 124, which made it into branch-2.10 already.

@codelipenghui
Copy link
Contributor

I have added release/2.10.1 just to make sure I will not miss to cherry-pick this one, after cherry-picking I will change to 2.10.0,

RobertIndie added a commit to RobertIndie/pulsar that referenced this pull request Feb 25, 2022
…t sub

Motivation

This PR is the doc for apache#14458

Modification

* Add doc for check `allowAutoSubscriptionCreation` when creating init sub

Signed-off-by: Zike Yang <[email protected]>
Signed-off-by: Zike Yang <[email protected]>
Signed-off-by: Zike Yang <[email protected]>
@github-actions github-actions bot added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Feb 25, 2022
Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM

log.warn("[{}] {} initialSubscriptionName: {}, topic: {}",
remoteAddress, msg, initialSubscriptionName, topicName);
commandSender.sendErrorResponse(requestId,
ServerError.NotAllowedError, msg);
Copy link
Member

Choose a reason for hiding this comment

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

Note that the consequence of sending this NotAllowedError is that the consumer will indefinitely send messages back to the broker to be redelivered. I think this is a sane default since it means messages won't be lost. I just want to make sure we agree on this design.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Member Author

Choose a reason for hiding this comment

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

That's right. +1

Signed-off-by: Zike Yang <[email protected]>
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Member

@mattisonchao mattisonchao left a comment

Choose a reason for hiding this comment

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

LGTM

@codelipenghui codelipenghui merged commit db25438 into apache:master Feb 27, 2022
codelipenghui pushed a commit that referenced this pull request Mar 1, 2022
…#14458)

Master Issue: #13408

### Motivation

In #13355, we added support for creating initial subscription when creating the producer. But the broker didn't check if the subscription can be created automatically. The initial subscription will be created even if the `allowAutoSubscriptionCreation` is disabled.

(cherry picked from commit db25438)
@codelipenghui codelipenghui modified the milestones: 2.11.0, 2.10.0 Mar 1, 2022
@Anonymitaet Anonymitaet added doc-complete Your PR changes impact docs and the related docs have been already added. and removed doc-required Your PR changes impact docs and you will update later. labels Mar 2, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
…apache#14458)

Master Issue: apache#13408 

### Motivation

In apache#13355, we added support for creating initial subscription when creating the producer. But the broker didn't check if the subscription can be created automatically. The initial subscription will be created even if the `allowAutoSubscriptionCreation` is disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. doc-complete Your PR changes impact docs and the related docs have been already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants