I need to programmatically start or stop a flow or endpoint from another flow. Can this be done? Is there risk of message loss?
<flow name="control>
<vm:inbound-endpoint path="in">
<script:component>
<!-- start/stop -->
</script:component>
</flow>
<flow name="startable-stoppable>
<any-transport:inbound-endpoint/>
<component/>
</flow>
After some research I’ve found that the best option in my case is to start/stop the connectors associated with the endpoints I want to control.
A disadvantage of this approach is that all the endpoints associated with the connector will be affected. If this is a problem, every endpoint should have its own connector.