See information about the latest product version
Designing a subflow created as a .msgflow file
If you are migrating subflows from earlier versions of WebSphere® Message Broker, you need to understand how to define a subflow created as a .msgflow file in WebSphere Message Broker Version 8.
- The subflow that you want to add to a message flow is defined
in a library. Applications and services can reference libraries.Note: A library is a logical grouping of related code, data, or both that typically contains reusable subflows, and other type of resources.
- The subflow that you want to add to a message flow is defined in the same Message Broker project, application, or service as the message flow.
- If you use a subflow in multiple message flows that are defined in one or more Message Broker projects, you can define the subflow within a library. This library can be referenced by any Message Broker project that needs access to the resources it contains.
- If you use a subflow in multiple message flows that are defined within the same Message Broker project, you can define the subflow within the Message Broker project.
Types of subflows supported
In WebSphere Message Broker Version 8, you can create a subflow as a .subflow file or as a .msgflow file.
Subflow content
You define subflow content in the same way as you define message flow content, by adding, configuring, and connecting message flow nodes.
- If you want to use a subflow as the first node in your message flow, you need to add at least one Input node, such as the MQInput node, and one generic Output node.
- If you want to use a subflow in the middle of a message flow, you need to add at least one generic Input node. You only need to add a generic Output node if you want to connect additional nodes in the message flow after you add the subflow.
- If you want to use a subflow as the last node in a message flow, you need to add at least one generic Input node, and at least one Output node, such as the MQOutput node.
Subflows created as .msgflow files are grouped in the folder named Message Flow within your application, service, or Message Broker project. The following figure illustrates where you can find subflows created as .msgflow files:

For subflows created as a .msgflow file, WebSphere Message Broker creates a blank flow to which you can add the message flow nodes that you need.
Design considerations
- Define subflows in libraries. Create references to a library from your Message Broker projects to be able to reuse the common logic.
- Limit the number of nested subflows.
- Group logic that is defined in consecutive compute nodes into one single compute node. This will improve performance, since the number of nodes loaded at runtime will be reduced.
- Add a version to the subflow.
- Do not nest subflows of different types, that is, do not add a subflow created as a .msgflow file into a subflow created as a .subflow file or vice versa.