geniusjoe commented on code in PR #23577:
URL: https://github.com/apache/pulsar/pull/23577#discussion_r1858097647


##########
pulsar-client/src/main/java/org/apache/pulsar/client/util/NameUtil.java:
##########
@@ -21,7 +21,7 @@
 import java.util.UUID;
 import org.apache.commons.codec.digest.DigestUtils;
 
-public class ConsumerName {
+public class NameUtil {
     public static String generateRandomName() {
         return DigestUtils.sha1Hex(UUID.randomUUID().toString()).substring(0, 
5);
     }

Review Comment:
   @lhotari 
   Hello Lari I find that `randomAscii(int)` will return a string which also 
contains symbols and signs, example below:
   ```
   ~ # for ((i=32;i<127;i++)) do printf "\\$(printf %03o "$i")"; done;printf 
"\n"                      root@VM-152-173-centos
    
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
   ```
   The original `generateRandomName()` function uses lower-case UUID substring 
(i.e. uses 0-9 and a-f), so that it might be a break changes when we replace 
this function with `randomAscii(int)`. Shall we choose another random string 
generator function? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to