WSO2 MI deploy main sequence

124 Views Asked by At

I want to change the default main sequence. I created a sequence with the name main, and I have a problem with deploy to the micro integrator. i get the following error:

[2023-02-27 09:23:03,087] ERROR {SequenceDeployer} - Sequence named : main already exists. [2023-02-27 09:23:03,088] ERROR {SequenceDeployer} - Sequence Deployment from the file : /home/wso2carbon/wso2mi-4.1.0/repository/deployment/server/synapse-configs/default/sequences/main.xml : Failed. org.apache.synapse.deployers.SynapseArtifactDeploymentException: Sequence named : main already exists.

What can I do with this?

1

There are 1 best solutions below

1
On

All messages that are not destined for a proxy service, REST API, or inbound endpoint are sent through the main sequence by default. If you need any mediation logic for a specific API or service, it's better to create a new sequence with a different name and use it.

In case, you need to change the default aforementioned default behaviour, you need to update the existing main sequence(main.xml) in the following location,

<MI_HOME>/repository/deployment/server/synapse-configs/default/sequences

You can either add mediators or refer to named sequences within the main sequence.

References:

About Main Sequence: https://ei.docs.wso2.com/en/latest/micro-integrator/references/synapse-properties/sequence-properties/#main-sequence

Named sequences: https://ei.docs.wso2.com/en/latest/micro-integrator/develop/creating-artifacts/creating-reusable-sequences/