Skip to content
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

Merged
merged 8 commits into from
Sep 6, 2023

Conversation

chanikag
Copy link
Contributor

@chanikag chanikag commented Jun 26, 2023

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

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");
Copy link
Contributor

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?

Copy link
Contributor Author

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.

isudana
isudana previously approved these changes Aug 28, 2023
@chanikag chanikag merged commit 0079a7f into wso2:master Sep 6, 2023
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants