abhilashmandaliya opened a new issue #11727:
URL: https://github.com/apache/pulsar/issues/11727


   **Is your enhancement request related to a problem? Please describe.**
   Currently, we can set `messageRoutingMode` and `messageRouter` via the 
`ProducerBuilder`. `messageRouter` takes a class object as a parameter. We 
should have an option to take the class name as an input and create the object 
at runtime. One use case where this will help is to extend the functionality of 
source connectors where a user may provide class name as part of his 
connector's config file and a connector calls `loadConf` method of 
`ProducerBuilder` which will create the instance of his class implementing 
'MessageRouter' at runtime.
   
   **Describe the solution you'd like**
   Create a new field having the name `messageRouterClassName`  whose instance 
will be created at run time. It will get precedence over 'messageRouter` in 
builder if someone configures both from code. This will not happen if one uses 
the `loadConf` method of `ProducerBuilder`.
   


-- 
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