I want to invoke a mule flow from a java class(the flow already listens to VM endpoint) which I can do it from the creating a mule client as below :-
MuleClient client = new MuleClient(muleContext);
client.dispatch("myEndPoint", "Message Payload", null);
However, I create the mule context while application start, ie Spring Boot main method.
How can I pass the mule context to any java class so that the method that can be used to send message by creating a mule client as shown above?
Please reference the below blog which explains how to do this: http://bushorn.com/running-mule-from-java/
HTH
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.