You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/20 11:37:27 UTC

[GitHub] [pulsar] abhilashmandaliya opened a new pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

abhilashmandaliya opened a new pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728


   Fixes: #11727
   
   Introduced a new property to configure the class name of custom MessageRouter implementation.
   
   If this enhancement looks good, it will need a doc change which I will make once the code part is approved.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-903091357


   > but I am wondering is it necessary to introduce such config name in ProducerConfiguration? If it's necessary for the application then it should happen at application level. I don't like idea to have duplicate config-param in configuration which serves the same purpose. I strongly recommend to have this logic at application layer and not at pulsar-config.
   
   Sorry I didn't get you. Which duplicate config do you mean? Does this entire proposal of creating a message router at runtime using config look inappropriate and do you recommend handling the same at the application level or something else? Kindly elaborate.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-902631488


   @lhotari @eolivelli @merlimat PTAL


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on a change in pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on a change in pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#discussion_r693308948



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ProducerConfigurationData.java
##########
@@ -64,6 +64,7 @@
     private int maxPendingMessages = DEFAULT_MAX_PENDING_MESSAGES;
     private int maxPendingMessagesAcrossPartitions = DEFAULT_MAX_PENDING_MESSAGES_ACROSS_PARTITIONS;
     private MessageRoutingMode messageRoutingMode = null;
+    private String messageRouterClassName = null;

Review comment:
       yes, instead `get()` , it should be `create(..)`




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-906989061


   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] lhotari commented on a change in pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
lhotari commented on a change in pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#discussion_r692920297



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java
##########
@@ -93,6 +98,19 @@ private MessageRouter getMessageRouter() {
 
         switch (messageRouteMode) {
             case CustomPartition:
+                String messageRouterClassName = conf.getMessageRouterClassName();
+                if (isNotBlank(messageRouterClassName)) {
+                    Class<?> clazz;
+                    try {
+                        clazz = Class.forName(messageRouterClassName);
+                        messageRouter = (MessageRouter) clazz.getDeclaredConstructor().newInstance();
+                        conf.setCustomMessageRouter(messageRouter);
+                    } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
+                            InstantiationException | IllegalAccessException | ClassCastException e) {
+                        log.error("[{}] Error occurred while instantiating the messageRouterClassName",

Review comment:
       It might not be easy to resolve the above suggestion since PulsarClientException is a checked exception and the the current methods don't current throw PulsarClientException. I'm not sure what wrapper exception to use. Perhaps you can check what would make sense.

##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java
##########
@@ -93,6 +98,19 @@ private MessageRouter getMessageRouter() {
 
         switch (messageRouteMode) {
             case CustomPartition:
+                String messageRouterClassName = conf.getMessageRouterClassName();
+                if (isNotBlank(messageRouterClassName)) {
+                    Class<?> clazz;
+                    try {
+                        clazz = Class.forName(messageRouterClassName);
+                        messageRouter = (MessageRouter) clazz.getDeclaredConstructor().newInstance();
+                        conf.setCustomMessageRouter(messageRouter);
+                    } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
+                            InstantiationException | IllegalAccessException | ClassCastException e) {
+                        log.error("[{}] Error occurred while instantiating the messageRouterClassName",

Review comment:
       I believe that it's better to throw an exception rather than logging the exception. Please removing logging and throw the exception. It makes sense to wrap the original exception in PulsarClientException (with message "Error occurred while instantiating the messageRouterClassName " + messageRouterClassName and the original exception as the cause)




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-1058886974


   The pr had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-904333005


   > > but this is for cases in frameworks where it is harder to add factories or custom code
   > 
   > Umm. but such applications anyway need to create `ProducerConfiguration` object so, creating MessageRouter and setting into `ProducerConfiguration` shouldn't be straight forward.? as I mentioned earlier, we need to consider more factors to make it correct: Factory class, properties map, class-loader and later on someone wants to add json properties (comma separated might not work), etc. so, I think it's better if we can keep such implementation outside client-lib and in actual appliation.
   
   Alright, I am closing the PR and issue.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-902693916


   /pulsarbot run-failure-checks


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya closed pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya closed pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-903188944


   > Does this entire proposal of creating a message router at runtime using config look inappropriate and do you recommend handling the same at the application level 
   
   Yes. It's better if we keep MessageRouter object creation in application and not at Pulsar-client because of multiple reasons: creation of MessageRouter object in pulsar-client doesn't solve any issue as it can be done by application as well in same way, creation of `MessageRouter` requires additional supporting configurations such as: Factory-class, properties map, new ClassLoader to make it right which can add unnecessary complication in `ProducerConfiguration`. also, this will be duplicate config for setting MessageRouter in a different way which doesn't add much value. So, it's better to keep such initialization of MessageRouter at application level and then we can set it into ProducerConfiguration.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-903946911


   >  but this is for cases in frameworks where it is harder to add factories or custom code 
   
   Umm. but such applications anyway need to create `ProducerConfiguration` object so, creating MessageRouter and setting into `ProducerConfiguration` shouldn't be straight forward.? as I mentioned earlier, we need to consider more factors to make it correct: Factory class, properties map, class-loader and later on someone wants to add json properties (comma separated might not work), etc. so, I think it's better if we can keep such implementation outside client-lib and in actual appliation.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-903465777


   > > Does this entire proposal of creating a message router at runtime using config look inappropriate and do you recommend handling the same at the application level
   > 
   > Yes. It's better if we keep MessageRouter object creation in application and not at Pulsar-client because of multiple reasons: creation of MessageRouter object in pulsar-client doesn't solve any issue as it can be done by application as well in same way, creation of `MessageRouter` requires additional supporting configurations such as: Factory-class, properties map, new ClassLoader to make it right which can add unnecessary complication in `ProducerConfiguration`. also, this will be duplicate config for setting MessageRouter in a different way which doesn't add much value. So, it's better to keep such initialization of MessageRouter at application level and then we can set it into ProducerConfiguration.
   
   Applications will still have an option to set it manually but this is for cases in frameworks where it is harder to add factories or custom code and where you know the router can be simply constructed. 
   
   Finally, I am fine with whatever you people decide :)


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on a change in pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on a change in pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#discussion_r693282904



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java
##########
@@ -93,6 +98,19 @@ private MessageRouter getMessageRouter() {
 
         switch (messageRouteMode) {
             case CustomPartition:
+                String messageRouterClassName = conf.getMessageRouterClassName();
+                if (isNotBlank(messageRouterClassName)) {
+                    Class<?> clazz;
+                    try {
+                        clazz = Class.forName(messageRouterClassName);
+                        messageRouter = (MessageRouter) clazz.getDeclaredConstructor().newInstance();
+                        conf.setCustomMessageRouter(messageRouter);
+                    } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
+                            InstantiationException | IllegalAccessException | ClassCastException e) {
+                        log.error("[{}] Error occurred while instantiating the messageRouterClassName",
+                                messageRouterClassName, new PulsarClientException(e));
+                    }

Review comment:
       and yes, we should not eat the exception rather fail the producer creation.

##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java
##########
@@ -93,6 +98,19 @@ private MessageRouter getMessageRouter() {
 
         switch (messageRouteMode) {
             case CustomPartition:
+                String messageRouterClassName = conf.getMessageRouterClassName();
+                if (isNotBlank(messageRouterClassName)) {
+                    Class<?> clazz;
+                    try {
+                        clazz = Class.forName(messageRouterClassName);
+                        messageRouter = (MessageRouter) clazz.getDeclaredConstructor().newInstance();
+                        conf.setCustomMessageRouter(messageRouter);
+                    } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
+                            InstantiationException | IllegalAccessException | ClassCastException e) {
+                        log.error("[{}] Error occurred while instantiating the messageRouterClassName",
+                                messageRouterClassName, new PulsarClientException(e));

Review comment:
       should not create wrapper PulsarClientException.

##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ProducerConfigurationData.java
##########
@@ -64,6 +64,7 @@
     private int maxPendingMessages = DEFAULT_MAX_PENDING_MESSAGES;
     private int maxPendingMessagesAcrossPartitions = DEFAULT_MAX_PENDING_MESSAGES_ACROSS_PARTITIONS;
     private MessageRoutingMode messageRoutingMode = null;
+    private String messageRouterClassName = null;

Review comment:
       instead having `messageRouterClassName`, we should have factory-class name with param properties so, one can initialize with custom value based on the environemnt.




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on a change in pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on a change in pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#discussion_r693302444



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ProducerConfigurationData.java
##########
@@ -64,6 +64,7 @@
     private int maxPendingMessages = DEFAULT_MAX_PENDING_MESSAGES;
     private int maxPendingMessagesAcrossPartitions = DEFAULT_MAX_PENDING_MESSAGES_ACROSS_PARTITIONS;
     private MessageRoutingMode messageRoutingMode = null;
+    private String messageRouterClassName = null;

Review comment:
       @rdhabalia do you mean something like this?
   ```java
   public interface MessageRouterFactory {
       MessageRouter get(Properties properties);
   }
   ```
   and while getting message router, we will do something like this:
   ```java
   String messageRouterFactoryClassName = conf.getMessageRouterFactoryClassName();
   Properties messageRouterFactoryProperties = conf.getMessageRouterFactoryProperties();
   clazz = Class.forName(messageRouterFactoryClassName);
   MessageRouterFactory messageRouterFactory = (MessageRouterFactory) clazz.getDeclaredConstructor().newInstance();
   messageRouter = messageRouterFactory.get(messageRouterFactoryProperties);
   ```
   
   where `properties` to this factory method will be part of the `ProducerConfigurationData` having name like  `messageRouterFactoryProperties` of type `java.util.Properties` and `messageRouterClassName` should be renamed to `messageRouterFactoryClassName`. This will give more flexibility to the users. If you meant something else, can you please share some example snippet?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-903063958


   but I am wondering is it necessary to introduce such config name in ProducerConfiguration? If it's necessary for the application then it should happen at application level. I don't like idea to have duplicate config-param in configuration which serves the same purpose. I strongly recommend to have this logic at application layer and not at pulsar-config.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-906913622


   I am reopening the PR in case other people want to discuss this


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Anonymitaet commented on pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#issuecomment-903369699


   Thanks for your contribution. Please do not forget to update docs after code changes are approved. And you can ping me to review the docs, thanks.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on a change in pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on a change in pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#discussion_r693304194



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedProducerImpl.java
##########
@@ -93,6 +98,19 @@ private MessageRouter getMessageRouter() {
 
         switch (messageRouteMode) {
             case CustomPartition:
+                String messageRouterClassName = conf.getMessageRouterClassName();
+                if (isNotBlank(messageRouterClassName)) {
+                    Class<?> clazz;
+                    try {
+                        clazz = Class.forName(messageRouterClassName);
+                        messageRouter = (MessageRouter) clazz.getDeclaredConstructor().newInstance();
+                        conf.setCustomMessageRouter(messageRouter);
+                    } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException |
+                            InstantiationException | IllegalAccessException | ClassCastException e) {
+                        log.error("[{}] Error occurred while instantiating the messageRouterClassName",
+                                messageRouterClassName, new PulsarClientException(e));
+                    }

Review comment:
       ok. then something like this should work I guess:
   ```java
   log.error("[{}] Error occurred while instantiating the messageRouterFactoryClassName", messageRouterFactoryClassName);
   throw new RuntimeException(e);
   ```
   
   RuntimeException looks a little odd, but I can see that at many places, we have taken this approach.
   
   @lhotari you also had suggestions on exceptions so please have a look here.




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] abhilashmandaliya commented on a change in pull request #11728: added an option to configure messageRouterClassName for MessageRoutingMode.CustomPartition

Posted by GitBox <gi...@apache.org>.
abhilashmandaliya commented on a change in pull request #11728:
URL: https://github.com/apache/pulsar/pull/11728#discussion_r693302444



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ProducerConfigurationData.java
##########
@@ -64,6 +64,7 @@
     private int maxPendingMessages = DEFAULT_MAX_PENDING_MESSAGES;
     private int maxPendingMessagesAcrossPartitions = DEFAULT_MAX_PENDING_MESSAGES_ACROSS_PARTITIONS;
     private MessageRoutingMode messageRoutingMode = null;
+    private String messageRouterClassName = null;

Review comment:
       @rdhabalia do you mean something like this?
   ```
   public interface MessageRouterFactory {
       MessageRouter get(Properties properties);
   }
   ```
   and while getting message router, we will do something like this:
   ```
   String messageRouterFactoryClassName = conf.getMessageRouterFactoryClassName();
   Properties messageRouterFactoryProperties = conf.getMessageRouterFactoryProperties();
   clazz = Class.forName(messageRouterFactoryClassName);
   MessageRouterFactory messageRouterFactory = (MessageRouterFactory) clazz.getDeclaredConstructor().newInstance();
   messageRouter = messageRouterFactory.get(messageRouterFactoryProperties);
   ```
   
   where `properties` to this factory method will be part of the `ProducerConfigurationData` having name like  `messageRouterFactoryProperties` of type `java.util.Properties` and `messageRouterClassName` should be renamed to `messageRouterFactoryClassName`. This will give more flexibility to the users. If you meant something else, can you please share some example snippet?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org