rdhabalia commented on a change in pull request #1178: Validate topic name on
broker side
URL: https://github.com/apache/incubator-pulsar/pull/1178#discussion_r166206623
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -446,45 +472,57 @@ protected void handleConnect(CommandConnect connect) {
@Override
protected void handleSubscribe(final CommandSubscribe subscribe) {
checkArgument(state == State.Connected);
- final String topicName = subscribe.getTopic();
final long requestId = subscribe.getRequestId();
final long consumerId = subscribe.getConsumerId();
+
+ DestinationName topicName;
+ try {
+ topicName = DestinationName.get(subscribe.getTopic());
Review comment:
it's small code but it seems duplicate for all handler. so, should we move
it to common method?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services