Version 2.1
Copyright © 2012 FuseSource Corp. All rights reserved.
Updated: 09 Oct 2012
Table of Contents
List of Figures
Fuse IDE is an Eclipse-based IDE for creating and testing large scale integration applications. Its key features are a graphical routing editor, an integrated testing platform that uses JMX to communicate with the containers in a test environment, and tooling for using Fuse Fabric to test applications on a truly large scale test environment.
Fuse IDE is a graphical design and test environment for integration applications. It provides tool that simplify all phases of application development. The key tools include:
template based project creation
visual route editor
container provisioning
JMX-based infrastructure monitoring
Fuse Fabric monitoring
message tracing
The tools are broken into three areas:
design time
test environment management
application testing
Architects and business analysts typically describe integration problems using graphical route diagrams. Diagrams make it easier to see all of the integration points and the paths that data travels between them. Icons denoting different transformations and routing choices can be added to flesh out more of the details. Diagrams can be discussed and modified on paper before any code is written.
When a developer has to implement the logic described in the diagrams, they face a number of challenges:
The diagram may not map directly to any routing language, so the developer has map the diagram into code.
If the route requires updating in order to be implemented, the developer then has to map the code back to diagram form to communicate the change to the customer.
The implementation will require some level of dependency management to ensure that all of the components work together.
Depending on how the route is being packaged, there could be a lot of packaging metadata to manage.
Fuse IDE solves theses problems by making route development a visual exercise. Using icons, based on the icons from Gregor Hohpe and Bobby Woolf's [Enterprise Integration Patterns], developers draw out the route on the route editor's canvas. Showing the route diagram to the architects and analysts ensures that the route matches their specifications. Fuse IDE generates the code needed to implement the routes. It also provides facilities for managing the dependencies and metadata needed to ensure that the application is packaged properly.
If your application requires Web services, messaging clients, or other application logic that is outside the scope of the routing framework, Fuse IDE provides a number of templates to generate projects for any framework supported by FuseSource. As with routing projects, Fuse IDE can manage the dependencies and packaging metadata for these projects. While it does not provide a specific editor for non-routing projects, Fuse IDE does include all of the Eclipse Java tooling.
Fuse IDE has the following design time features:
graphical route editor—drag and drop integration and mediation components to rapidly connect systems
imports existing routes—existing routes defined in XML are imported and modeled on the canvas
predefined EIPs—Fuse IDE comes with implementations of all the EIPs that can be configured to suite your application
template based project creation—projects are generated using Maven archetypes that define all of the boiler plate code for a given application
JUnit test wizard—wizard automatically generates JUnit tests for Apache Camel routes
Integration projects typically involve many components distributed across an enterprise. An integration project can include several routes, each with its own set of inputs and outputs, multiple messaging conduits, and several business applications. In most cases the functionality is distributes across a number of containers running on a number of servers.
Validating that a distributed application performs to specification requires the ability to monitor the state of all the components of the system. It also requires the ability to control the parameters under which the system is operating. To test fault tolerance, you need to be able to quickly kill one or more containers. To test how the application handles heavy network traffic, you need to be able to flood the system with messages.
Fuse IDE provides tools that make it easy to manage both small and large scale distributed environments. It uses JMX to create and monitor local containers. For large scale environments, it uses technology from Fuse Fabric to create, manage, monitor, provision and destroy containers that can be distributed across many servers or in the cloud.
Fuse IDE has the following features for managing a testing environment:
Environment viewer—views all of the processes deployed into the test environment using JMX
Shell—console access to any container in the fabric
Log View—display log entries from the log of any container in a fabric
Container viewing—display real-time status and details of containers in a fabric
Configuration profile management—view the details of a configuration profile, create new configuration profiles, and deploy the profiles to containers
Profile versioning—make changes to configuration profiles without overwriting existing profiles
Container deployment —deploy new containers to your test environment
For more information about Fuse Fabric and what it means to deploy containers into a fabric see Fuse Fabric.
Integration projects are typically large and involve a number of different components. A simple integration project typically includes one or more routes with multiple endpoints and multiple JMS destinations that are managed by one or more Fuse MQ Enterprise instances. Traditional debugging tools, such as JConsole, log messages, and print statements, are cumbersome and ineffective means for uncovering problems in such complicated applications.
Fuse IDE displays a graphical representation of the Fuse components deployed as part of an integration project. This representation shows:
all deployed containers
all services each container hosts
all deployed brokers
all destinations each broker manages
all running routes
all deployed endpoints
Fuse IDE allows you to browse the contents of any JMS destination. It also allows you to drag and drop messages into JMS destinations.
For route debugging, you can drop messages onto route endpoints and trace their progress through the route. You can see the message at each step in the route and ensure that it traverses the route properly and that the contents are properly transformed. If you find errors, you can edit the route while it's running and see the changes take effect immediately.
Fuse IDE has the following debugging features:
Environment viewer—views all of the processes deployed into the test environment using JMX
Route viewing—graphical representation of the routes deployed in the test environment
JMS destination browsing—displays all of the messages in a JMS queue or JMS topic
Endpoint browsing—displays all of the messages at a route endpoint
Route tracing—trace a message's path through a route and monitor its contents
Live route editing—modify deployed routes in the Fuse IDE graphical route editor
Fuse IDE is organized into three perspectives:
Java Perspective—the primary perspective for developing applications
Fuse Integration Perspective—the perspective for testing applications in small-scale environments using just JMX
Fuse Fabric Perspective—the perspective for testing applications in large-scale deployments using a fabric
The typical work flow when doing new development with Fuse IDE is:
Create one or more new projects for the parts of the application.
Implement the application logic.
Using the built-in server wizards, deploy containers to host your application.
Using the Fuse Integration Perspective, test the different parts of the application locally.
When the application passes testing locally, use the Fuse Fabric Perspective to test the application in a large, distributed test environment.
Fuse IDE incorporates Fuse Fabric to ease the process of testing applications in large-scale highly distributed environments. Fuse Fabric allows you to manage large groups of containers that are deployed in a fabric. The fabric is managed by a distributed process that maintains the configuration information about all of the containers in the fabric and runtime information about the active containers.
Fuse IDE allows you connect to a group of containers organized into a fabric. All of the brokers in a fabric are managed by a distributed Fabric Ensemble that stores runtime and configuration information for all of the containers in the fabric. Using this information the ensemble enables you to manage large test environments by:
automating the creation of deployment artifacts from Fuse IDE projects
Fuse IDE can create new configuration profiles based on an Fuse IDE project. It also handles loading the required artifacts into the fabric's repository so it can be deployed to any of the containers in the fabric.
automating client connection, failover, and load balancing configuration
When services, including message brokers, are configured into a fabric, clients can use special discovery protocols that queries the ensemble for an appropriate service instance or message broker. The ensemble uses a round robin algorithm for balancing load among common service instances in the fabric. The fabric discovery connection will also automatically failover to other service instances without needing to know any details about what instances are deployed.
centralizing configuration information
All of the configuration for each container in the fabric, including details about which bundles are deployed, are stored in the ensemble. Any of the configurations can be edited from a remote location and directly applied to any container in the fabric.
centralizing management and monitoring functionality
Using Fuse IDE you can update configuration profiles, deploy new containers, shutdown containers, and get runtime metrics for any of the containers in the fabric
Figure 2.1 shows the components of a fabric with seven brokers and an ensemble consisting of three servers.
The key components of the fabric are:
Fabric Ensemble—a group of one or more Fabric Servers that work together to maintain the registry and other services that provide the glue for the fabric
Fabric Server—a container that hosts the runtime functionality for the ensemble
Fabric Container—a Fuse ESB Enterprise container that is managed by a Fabric Agent
Fabric Agent—a process that communicates with the ensemble to manage the container's configuration
The Fabric Ensemble, based on Apache Zookeeper, maintains two databases:
centralized configuration—stores the configuration profiles for all of the containers in the fabric. The configuration profiles are organized by versions and allow for inheritance between profiles.
runtime information—stores status for all of the containers in the fabric. The runtime information stored in the database includes the status of the container, the address of any endpoints and messaging destinations exposed by the container, the JMX URL used to monitor the container, the number of client's accessing services deployed in the container, etc.
The ensemble is intended to be distributed across multiple machines to provide a level of high-availability. The servers in the ensemble use a quorum policy to elect the master server and will re-elect a new master when the current master fails. To ensure optimal performance of the ensemble you should deploy an odd number of Fabric Servers to maintain the ensemble. The more servers in the ensemble, the more failures it can endure.
The ensemble is dynamically updated by the Fabric Agents running in the containers that make up the fabric. The agents routinely report the status of their container to the ensemble. Configuration profiles are also updated dynamically when they are edited.
A profile is a collection of configuration data that defines the runtime parameters for a container. It contains details about:
features—XML specifications that define a collection of bundles, jars, and other artifacts needed to implement a set of functionality
bundles—the OSGi bundles or Fuse Application Bundles to load into a container
repositories—the URIs from which the container can download artifacts
configuration files—configuration files OSGI Admin PIDs that are loaded by the container's OSGi admin service and applied to the services running in the container
Profiles are additive and can inherit properties from parent profiles. This makes it possible to create standardized configurations that can be used throughout your deployment. The profile for a specific container will inherit the standard configuration from the base profile and add any specific settings needed to tailor the container for its specific deployment environment.
Profiles are organized into versions. A version is a collection of profiles. Creating a new version copies all of the profiles from the parent version and stores them in a new collection. A Fabric Container can access only one version at a time, so changes made to the profiles in one version will only effect the containers that are assigned to the version being edited. This makes it easy to roll out changes to a fabric incrementally.
A Fabric Agent is the link between the ensemble and a Fabric Container. It communicates with the ensemble to:
manage a container's configuration and provisioning—the agent regularly checks to see what profiles are assigned to the container and if the container is properly configured and running the appropriate set of services. If there is a discrepancy, the agent updates the container to eliminate the discrepancy. It flushes any extraneous bundles and services and install any bundles and services that are missing.
updating the ensemble's runtime information—the agent reports back any changes to the container's runtime status. This includes information about the containers provisioning status, the endpoints and messaging destination exposed by the container, etc.
One of the advantages of a fabric is that you can manage it from any of the containers in the fabric. The fabric command shell interacts directly with the ensemble, so all changes are immediately picked up by all of the containers in the fabric.
You can also use Fuse Management Console to work with a fabric. Fuse Management Console provides a Web-based UI that allows you to:
add containers to a fabric
create profiles and versions
edit profiles
assign profiles to containers
monitor the health of the containers in a fabric
By default, Fuse IDE opens in the Java perspective, providing access to Fuse IDE's route editor, the main design time tooling, shown in Figure 3.1.
It consists of four main areas:
Canvas—the large grid area on which routes are constructed
Pallet—the pane to the right of the canvas from which Enterprise Integration Patterns (EIPs) are selected
Project view—the pane on the left side of the canvas, which can display multiple views of the active project. The pane defaults to Package Explorer, which displays the project's folders and files in an hierarchical tree format.
![]() | Tip |
|---|---|
We recommend that you drag Outline view from the upper right side of the
workspace to the lower left side, beneath Package Explorer, to
provide optimal space for the route editor. Outline view
displays, in an outline of EIP icons, the contents of the current
|
Properties editor—the editor in which you configure the selected node's properties. It opens in a tab in the pane below the canvas.
The canvas is route editor's workbench and where you do most of your work. It displays a graphical representation of a route, which is made up of one or more connected EIP patterns (called nodes once they are placed on the canvas). Because the canvas displays only one route at a time, it delineates one route from another. You can add additional routes to your project, but each is displayed separately on its own slice of canvas.
Patterns are typically placed on the canvas by dragging them from the palette. Once on the canvas, a node's properties can be edited in the Properties editor. To do so, you need only select a node to open and populate the Properties editor with the properties that apply to that node. You can also edit a route's properties by clicking the canvas, which opens and populates the Properties editor with the properties that correspond to a single route in the routing context file.
![]() | Tip |
|---|---|
Clicking the Source tab at the lower, left of the canvas displays the XML code generated for the route, which you can then edit. The edits you make in Source view appear on the canvas when you switch back to Design View. |
The Pallet contains all of the patterns needed to construct a route. The Palette groups the patterns into categories according to function:
Endpoints—patterns that start or end a route
Routing—patterns that direct the flow of messages based on specified criteria
Control Flow—patterns that behave like control functions in a programming language. For example, some define loops, some handle error conditions, some handle transactions, and so on.
Transformation—patterns that change the contents of a message as it passes through a route
Miscellaneous—patterns that control the environment in which a route executes. For example, the Threads pattern specifies the number of threads available.
Package Explorer provides access to all of the components that make up a project. It provides the tools for managing, configuring, running, and debugging your project.
Outline view provides a graphical outline of your route components. It enables you to switch easily between routes in a multiroute project. Clicking on a route in Outline view displays it on the route editor's canvas.
Outline view also provides a viewing portal when the route extends beyond the viewable area on the canvas. Sliding the view portal in Outline view over outlier nodes moves the canvas accordingly to bring those nodes into view.
You use the Properties editor to configure the route and each node in it. Each type of node has a set of properties that can or must be set. The Properties editor opens populated with fields that apply to the selected node.
The Properties editor makes it clear which fields are required.
marks any required property that is not set, and the
Properties editor displays an error message stating the number of
required properties that still must be set, as shown in Figure 3.2.
![]() | Tip |
|---|---|
The Properties editor's Documentation tab displays information about how to configure the selected node. |
While you'll spend the majority of your time using the route editor, Fuse IDE includes wizards that facilitate creating the following:
Fuse IDE projects
Apache Camel context files
Apache Camel-specific JUnit tests
Fuse IDE leverages the m2e plug-in's ability to execute Maven archetypes to create starting point projects for working on Apache Camel routes. The New Fuse IDE Project wizard displays the Apache Camel Maven archetype options. Selecting one creates a project that is properly configured for developing Apache Camel applications.
For more information, see Creating a New Fuse IDE Project in Using Fuse IDE.
Apache Camel context files are the key piece of any project. They contain the routing rules that form the backbone of an Apache Camel application. Fuse IDE has a simple wizard that creates new Apache Camel context files.
For more information, see Creating a New Camel XML file in Using Fuse IDE.
Fuse IDE provides a wizard that generates JUnit code for testing your routes. The wizard makes it easy to select the assertions to test. It also simplifies the process of testing particular endpoints in a route.
For more information, see Creating a new Apache Camel JUnit test case in Using Fuse IDE.
Fuse IDE provides a wizard that creates a message that you can use to test a route. You drop the message on Camel endpoints or FuseMQ destinations to track its progress through the route. The wizard creates a skeletal message, which you can edit to customize the content of both the message body and the message header.
For more information, see Creating test messages for route tracing in Using Fuse IDE.
In addition to simplifying the process of creating and editing routes, Fuse IDE provides tools to make it easier to run your routes and deploy them into test environments. Using Fuse IDE you can:
run a route using Maven
run a route as a local Apache Camel context
deploy into a running OSGi container
You can run your route with Maven, using Maven's standard goals. This method closely simulates how an Apache Camel project would run outside of Fuse ESB Enterprise.
See Working with runtime profiles in Using Fuse IDE .
FuseSource subscribers can run all routes in a context directly inside Fuse IDE without setting up a Maven runtime profile. You can run routes locally with or without running validation tests. Running a context directly inside Fuse IDE does not require that your project be a Maven project.
FuseSource subscribers can also deploy routes into a running OSGi container. Fuse IDE supports deployment into these OSGi containers: Fuse ESB Enterprise v7.0, Apache ServiceMix v4.x, and Apache Karaf v2.x.
See Deploying Projects to a Container in Using Fuse IDE.
The Fuse Integration perspective, shown in Figure 4.1, is where you access the Fuse IDE debugging tools.
The Fuse Integration perspective consists of five main areas:
JMX Explorer—lists the JMX servers and the infrastructure they monitor.
Diagram View—provides a graphical representation of an item selected in the JMX Explorer. If the selected item is a route, Diagram view also displays timing metrics for each processing step in the route.
Messages View—lists the messages that have passed through the selected JMS destination or Apache Camel endpoint.
Servers—lists the Fuse ESB Enterprise, Apache Karaf, or Apache ServiceMix containers defined in your Fuse IDE environment.
Properties—displays the properties of the selected item.
The JMX Explorer drives the debugging activities in the Fuse Integration perspective. It determines what routes are displayed in the Diagram View, the Properties viewer, and the Messages View. It is also provides menu commands for activating route tracing, adding and deleting JMS destinations, and starting and stopping routes. It is also the target for dragging and dropping messages onto a route.
By default, the JMX Explorer shows all of the Java processes running on your local machine. You can add JMX servers as needed to view infrastructure on other machines.
The Messages View is used for JMS browsing and route tracing.
When a JMS destination is selected in the JMX Explorer, the view lists all of the messages sitting in the destination.
When a browsable Apache Camel endpoint is selected and route tracing has been activated, the view lists all of the messages that have passed through the endpoint since tracing was activated.
When a message in the Messages View is selected, its details are displayed in the Properties viewer. The message details include the message's body and all of its headers.
A large portion of the Fuse Integration perspective is dedicated to visualizing the processes running in your infrastructure. In addition to displaying the running processes, the Fuse Integration perspective also displays all of the runtime metrics that are gathered from JMX MBeans.
The JMX Explorer and the Diagram View show you the processes deployed as part of your integration infrastructure.
The JMX Explorer arranges items in a tree and drives the rest of the operations on the Fuse Integration perspective.
Diagram View shows your infrastructure as a graph. It shows all of the nodes under the item selected in the JMX Explorer.
For more information see The JMX Explorer in Using Fuse IDE.
JMX metrics are displayed in the Properties view of the Fuse Integration perspective. Depending on the type of process, the JMX metrics provide details such as:
time running
time to process a message
number of messages processed
processor load
memory foot print
For more information see Viewing a component's properties in Using Fuse IDE.
When debugging a route, it is helpful to see how a test message changes as it passes through the route. It is also helpful to trace the message's path through the route.
Fuse IDE's route tracing feature enables you to do both. The Diagram View displays a graphical representation of the route. The Messages View displays the messages processed by the node selected in JMX Explorer. You can also display the full contents of a message in the Properties view.
Debugging a route in the Fuse Integration perspective enables you to see how the route functions in its actual deployment environment. The route is hooked up to live endpoints that are managed by live brokers. When you drag a test message on to a route's endpoint, you're adding it to that endpoint.
You can ensure that the start endpoint is properly configured to receive messages. As the message passes through each processor in the route, you can check the entire message, including all of the transport headers, to see if it is being processed correctly. You can also check that the target endpoint is properly configured to pass results to the intended target destination.
Diagram View displays your routes as graphs. Each node of the graph represents a step in the route and is identified by an icon representing the EIP pattern the node represents.
With route tracing activated, you can trace, in Diagram View, each node that has processed a message by scrolling through the message list in Messages View.
A browser that inspects the messages on a JMS destination without consuming them is key to troubleshooting a distributed message system. Inspecting the messages can help you understand why messages are backing up or why they are being discarded too soon.
In addition to inspecting JMS destinations, Fuse IDE allows you to add messages to them. This feature enables you to add controlled test cases into the system for detailed analysis.
JMX Explorer shows all of the JMS destinations deployed in your infrastructure. When you select a destination from the tree, a list of the messages sitting in it are listed in Messages View. Messages View displays the basic properties of the message.
Selecting one of the messages in Messages View displays all of that message's details, including the full message body, in the Properties viewer.
![]() | Subscription Only |
|---|---|
This feature is available only to FuseSource subscribers. |
The Fuse Fabric perspective, shown in Figure 5.1, is where you access the fabric development and debugging tools.
The Fuse Fabric perspective consists of six main areas:
Fabric Explorer—lists the fabrics and the containers, profiles, and versions of which they consist.
Diagram View—provides a graphical representation of a node selected in Fabric Explorer.
Shell— provides console access to any container running on the fabric.
Log view—lists the log entries of the selected container or the selected JMX process.
Messages View—lists the message instances that passed through the nodes in a selected route, after tracing was enabled on the route.
Properties view—displays the properties of an object selected in Fabric Explorer.
The Fabric Explorer provides access to your fabrics. Once Fuse IDE is connected to a fabric, Fabric Explorer provides access to all of the fabric's components (containers, profiles, and profile versions) enabling you to configure, run, and debug your project in the fabric environment.
Use Diagram View in conjunction with Messages View to track a message through the nodes of a route for which tracing has been activated. In Diagram View, the node which corresponds to the message instance selected in Messages View is highlighted. Messages View displays metrics for the selected message instance, including the time at which it exited the highlighted node.
Log view displays the log entries of the container selected in Fabric Explorer. This feature enables you to see the log messages of any container running in a fabric.
Double-clicking a process in a container's JMX tree opens the process in a jconsole-like viewer, where you can browse its attributes, operations, notifications, and other information, all of which are presented in tabular format.
The Messages View is used for tracing messages through a route in a fabric environment.
When an Apache Camel route for which route tracing has been activated is selected in Fabric Explorer, Messages View lists all messages that pass through the route from the time tracing was activated. Messages View also provides metrics for each message instance, making it easier to debug routes.
Use the view's button periodically to update its display of message traces.
For container nodes, the Properties view also provides the Profiles tab, for viewing the profiles assigned to the container, and the Profile Details tab, for viewing the details of each assigned profile.
The Profiles editor enables you to change the profiles associated with the selected container, and the Profile Details editor enables you to modify the configuration of the selected profile.