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

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS

MySQL Error Invalid Table or Database Name