-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support executing sequence at the MI server startup #2920
Conversation
...r.initializer/src/main/java/org/wso2/micro/integrator/initializer/ServiceBusInitializer.java
Show resolved
Hide resolved
This is to introduce an automation mode to MI To start the MI in automation mode the capp name with a main sequence has to be provided Ex: sh micro-integrator.sh --car sampleCarCompositeExporter
This is to fix https://github.com/wso2/api-manager/issues/2032 To run, On Windows: micro-integrator.bat -DenablePrometheusApi For Linux/MacOS/CentOS : ./micro-integrator.sh -DenablePrometheusApi
public void start(MessageContext messageContext, String observedSeq) { | ||
if ("true".equals(messageContext.getProperty(ServiceBusConstants.AUTOMATION_MODE_INITIALIZED_PROPERTY))) { | ||
seqName = observedSeq; | ||
messageContext.setProperty(ServiceBusConstants.AUTOMATION_MODE_INITIALIZED_PROPERTY, "false"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we setting this to false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise by consequence sequence calls the sequence name is getting overwritten as this condition is still true. But instead of a boolean changed the logic to pass the sequence name as a property.
Purpose
This is to introduce an automation mode to MI
To start the MI in automation mode the capp name with a main sequence has to be provided
Ex: sh micro-integrator.sh --car sampleCarCompositeExporter
Depends on PR in synapse wso2/wso2-synapse#2086