forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return more informative error message when trying to create subscript…
…ion on non-persistent throug Rest API or pulsar-admin CLI. (apache#7831) Fixes apache#7397 Motivation When use pulsar-admin to create a subscription on a non-persistent topic, get the server error This change return more informative error message when trying to create subscript ion on non-persistent through Rest API or pulsar-admin CLI. Modifications Currently when creating subscription is called with non-persistent topic service will try to create the subscription which will fail with casting exception when trying to cast NonPersistentSubscription to PersistentSubscription and client will see internal error. Add check if create subscription command is called for a non-persistent topic before actually Verifying this change This change added tests and can be verified as follows: Added unit test Verified with local standalone
- Loading branch information
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters