When enabling JMX for the pool, it appears that you must do this:
ConnectionFactoryOptions.Builder builder = ConnectionFactoryOptions.builder().from(baseOptions) ... .option(Option.valueOf("registerJmx"), "true")
instead of
. .option(PoolingConnectionFactoryProvider.REGISTER_JMX, Boolean.TRUE)
because line 167 of PoolingConnectionFactoryProvider insists on a string. mapper.from(REGISTER_JMX).as(registerJmx -> registerJmx.equals("true")).to(builder::registerJmx);
This seems very incorrect.
Moreover, this option, along with the name of the pool, should be externally configurable in R2dbcProperties.Pool through R2dbcAutoConfiguration.
Expected behavior/code
I should be able to use a standardized value for the registerJmx option if I am configuring it manually, and it should be able to be configured externally if I am using Spring Boot
Bug Report
Versions
Current Behavior
When enabling JMX for the pool, it appears that you must do this:
ConnectionFactoryOptions.Builder builder = ConnectionFactoryOptions.builder().from(baseOptions) ... .option(Option.valueOf("registerJmx"), "true")
instead of. .option(PoolingConnectionFactoryProvider.REGISTER_JMX, Boolean.TRUE)
because line 167 of PoolingConnectionFactoryProvider insists on a string.
mapper.from(REGISTER_JMX).as(registerJmx -> registerJmx.equals("true")).to(builder::registerJmx);
This seems very incorrect.
Moreover, this option, along with the name of the pool, should be externally configurable in R2dbcProperties.Pool through R2dbcAutoConfiguration.
Expected behavior/code
I should be able to use a standardized value for the registerJmx option if I am configuring it manually, and it should be able to be configured externally if I am using Spring Boot