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 2018/12/05 20:04:31 UTC

[GitHub] sijie commented on a change in pull request #3126: [Message Routing] Set CustomPartition implicitly when messageRouter is set

sijie commented on a change in pull request #3126: [Message Routing] Set CustomPartition implicitly when messageRouter is set
URL: https://github.com/apache/pulsar/pull/3126#discussion_r239218176
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerBuilderImpl.java
 ##########
 @@ -102,6 +101,11 @@ private ProducerBuilderImpl(PulsarClientImpl client, ProducerConfigurationData c
                     .failedFuture(new IllegalArgumentException("Topic name must be set on the producer builder"));
         }
 
+        if(conf.getCustomMessageRouter() != null
+                && conf.getMessageRoutingMode() != MessageRoutingMode.CustomPartition) {
 
 Review comment:
   if a message router is set, but message routing mode is not `CustomPartition`, should not it be better to fail the builder to building a producer? because it means the users of pulsar are using the wrong settings or have a different expectation.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services