Chapter 4. Routing data with Mule

 

In this chapter

  • Understanding inbound and outbound routing
  • Filtering with routers
  • Using inbound routers
  • Using outbound routers

You’ve probably been exposed to a router at some point in your career. Usually these are of the network variety—like the DSL router in your bedroom or the core router in your data center. In either case, the router’s function is the same: to selectively move around data. Not surprisingly, many of the concepts that underlie network routing are also applicable to routing data between applications. We’ll see in this chapter how multicasting, static routing, forwarding, and filtering are just as applicable to enterprise application integration as they are to networking devices.

We’ve already seen some examples of routing. In the previous chapter, we used pass-through routing to move data from inbound endpoints to outbound endpoints. We also used a chaining router to pass the response of one endpoint to the input of another endpoint. Let’s consider an integration scenario and see how Mule’s routing support helps us out.

Recall Clood, Inc.’s monitoring database from the last chapter? Let’s see how we can modify the outbound routing to send the message to two destinations simultaneously. We’ll insert a row into the database and send an instant message to Clood’s Jabber server. Listing 4.1 shows the modified outbound routing configuration.

Listing 4.1. Multicast data to a JDBC and XMPP endpoint

4.1. Working with routers

4.2. Using filters with routers

4.3. Using inbound routers

4.4. Outbound routing

4.5. Summary

sitemap