Project: mule
Issue MULE-9211: Configurations should be able to have dynamic parameters which don't trigger dynamic configurations
Currently, all configuration parameters with expression values are translated into a DynamicConfigurationResolver. This is fine for most cases There're other cases though in which it's desirable to have dynamic values which shouldn't necessarily trigger a new config instance. For example, an FTP connector which needs to switch between ASCII and BINARY mode. It should be fairly easy to switch modes through the use of an expression, but we don't want to trigger new connection pools for each case. Only connection credentials should trigger that. To enable this case, we can leverage the ValueResolver object which already exists in the extension-support module. The config can have: {code:java} @Parameter private ValueResolver transferMode; {code} and then when you want to get the value you go: {code:java} ftpConnector.getTransferMode().resolve(event); {code}
Story points: 8