WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Routing a message using a .NETCompute node

Route a message by using the .NETCompute node as a filter node.

Before you start:

Add a .NETCompute node to your message flow.

By default, the output message assembly is propagated to the Out terminal after the evaluate method in the .NET code has been processed. However, the .NETCompute node supports dynamic terminals. You can create extra terminals, and use the .NETCompute as a filter node by propagating a message to the appropriate terminal, based on the message content.

The following snippet of C# code shows how you might filter a message, depending on the content of an element in the message:

            #region UserCode
            // Add user code in this region to filter the message
            
            if (root[NBParsers.XMLNSC.ParserName].LastChild.Name.Equals("LoyaltyProgram"))
            {
                outTerminal.Propagate(assembly);
            }

            if (root[NBParsers.XMLNSC.ParserName].LastChild.Name.Equals("SaleEnvelope"))
            {
                altTerminal.Propagate(assembly);
            }
            else
            {
                failureTerminal.Propagate(assembly);
            }
            #endregion UserCode

For more information about routing messages, see the .NETCompute Node sample.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:47:58


Task topicTask topic | Version 8.0.0.7 | bc34207_