Removing Connections Between Nodes in Message Broker via Java API

import java.io.File;
import java.io.IOException;
import com.ibm.broker.config.appdev.MessageFlow;
import com.ibm.broker.config.appdev.FlowRendererMSGFLOW;

public class LoadMessageFlow
{
    public static void main(String[] args)
    {
        File oMsgFlowFile = new File("/root/ibm/myflow.msgflow");

        MessageFlow oMessageFlow = FlowRendererMSGFLOW.read(oMsgFlowFile);

        MQInputNode oNode1 = (MQInputNode) oMessageFlow.getNodeByName("Node1");
        MQOutputNode mNode2 = (MQOutputNode) oMessageFlow.getNodeByName("Node2");
        oMessageFlow.disconnect(oNode1.OUTPUT_TERMINAL_OUT, oNode2.INPUT_TERMINAL_IN);
    }
}

Comments

Popular posts from this blog

Basic Send Message to MQ with Java and IBM MQ JMS

Basic Receive Message to MQ with Java and IBM MQ JMS

Creating a simple Alert / Success Message with ASP.NET/VB using Bootstrap