The configuration of mule-maven-plugin allows to set false
which is fine for keeping manually added properties like
secure.properties.key=..........
when re-deploying a new application.
see /mule-deployer/src/main/java/org/mule/tools/deployment/cloudhub/CloudHubArtifactDeployer.java => resolveProperties(..)
But when setting overrideProperties to false all properties which already exist in the worker are kept.
Due to that e.g. changing <org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>16</org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>
to
<org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>32</org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>
in the pom.xml does not have any effect because the original value 16 is taken in resolveProperties(...)
So we need to deploy with overrideProperties=true to get the updated MAX_CONCURRENCY but then worker is not starting
because secure.properties.key is missing. It needs to be added manually again (which makes automatic deployment useless).
As there are several solutions to solve this I first want to start discussion before creating a pull request.
Solution 1: Just keep manually added
- take entries of originalApplication.getProperties() for those ones not in deployment.getProperties()
Solution 2: Specify property names to be kept
- Add a List to configuration instead of overrideProperties:
<keepPropertyNames><keepPropertyName></keepPropertyName></keepPropertyNames>
where all properties are specyfied which sould be taken from originalApplication.getProperties().
In our case: <keepPropertyName>secure.properties.key</keepPropertyName>
Solution 3: Specify property names to override always
- Add a List to configuration instead of overrideProperties:
<forceOverwritePropertyNames><forceOverwritePropertyName></forceOverwritePropertyName></forceOverwritePropertyNames>
In our case: <forceOverwritePropertyName>org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY</forceOverwritePropertyName>
The configuration of mule-maven-plugin allows to set false
which is fine for keeping manually added properties like
when re-deploying a new application.
see /mule-deployer/src/main/java/org/mule/tools/deployment/cloudhub/CloudHubArtifactDeployer.java => resolveProperties(..)
But when setting overrideProperties to false all properties which already exist in the worker are kept.
Due to that e.g. changing
<org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>16</org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>to
<org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>32</org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY>in the pom.xml does not have any effect because the original value 16 is taken in resolveProperties(...)
So we need to deploy with overrideProperties=true to get the updated MAX_CONCURRENCY but then worker is not starting
because secure.properties.key is missing. It needs to be added manually again (which makes automatic deployment useless).
As there are several solutions to solve this I first want to start discussion before creating a pull request.
Solution 1: Just keep manually added
Solution 2: Specify property names to be kept
<keepPropertyNames><keepPropertyName></keepPropertyName></keepPropertyNames>where all properties are specyfied which sould be taken from originalApplication.getProperties().
In our case:
<keepPropertyName>secure.properties.key</keepPropertyName>Solution 3: Specify property names to override always
<forceOverwritePropertyNames><forceOverwritePropertyName></forceOverwritePropertyName></forceOverwritePropertyNames>In our case:
<forceOverwritePropertyName>org.mule.runtime.core.api.processor.strategy.AsyncProcessingStrategyFactory.DEFAULT_MAX_CONCURRENCY</forceOverwritePropertyName>