8 Filtering and Flowing

 

This chapter covers

  • The Broker
  • Triggers and filters
  • Sequences
  • Parallels

In the last chapter, I focused on the hard-wiring approach to Eventing. Now I want to look at some of the luxury features. These basically fall into two basic categories.

The first is brokering and filtering, creating a middleman to make the shipment of CloudEvents from one place to another simpler and more reliable. I’ve already spent a fair amount of time on the basics in previous chapters, but there are a bunch of additional capabilities around error-handling that I can at last reveal to you. I’ll also make a small detour into the lower-level guts of Eventing: Channels.

The second category of luxury features is flows, higher-level abstractions over the wiring of Sources, sinks, and so forth. These go last because these build on many of the topics we’ve discussed so far in chapter 7. I suspect that in time these will grow to be a larger and larger part of your systems.

Together, these luxury features can save you a fair amount of boilerplate. The goal is to express your intent at a higher level, after all, and to do so somewhat efficiently. Brokers, Triggers, Sequences, and Parallels provide higher abstractions that you can use to move CloudEvents to where these are needed with a minimum of hassle.

8.1 The Broker

8.2 Filters

8.2.1 Filtering on custom attributes

8.2.2 Nice things that Eventing adds for you

8.3 Sequences

8.3.1 A walkthrough

8.4 The anatomy of Sequences

8.4.1 Step

8.4.2 Reply

8.4.3 ChannelTemplate and Channels

8.4.4 Mixing Sequences and filters

8.5 Parallels

8.5.1 A walkthrough

8.6 Dealing with failures