Selecting a channel

Let's discuss what default implementations have been provided by Spring Integration and how they can be leveraged.

Publish-subscribe channel

This is the only implementation of the publish-subscribe model of channel. The primary purpose of this channel is to send messages to registered endpoints; this cannot be polled. It can be declared as follows:

<int:publish-subscribe-channel id="pubSubChannel"/>

Let's discuss each of the elements in this line; this will be used throughout the examples of this chapter:

  • int: This is a namespace that declares all Spring Integration components. As discussed in Chapter 1, Getting Started, the STS visual editor can be used to add different namespaces from Spring Integration.
  • publish-subscribe-channel ...

Get Spring Integration Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.