Control bus
Service activator for managing components within the messaging framework.
The control bus is a service activator for managing components within the messaging framework itself. It receives command messages on its input channel in the form of SpEL expressions, which are then executed in the application context.
If the executed command returns a result, this is send as the contents of a new message (or multiple messages) to the output channel. If the command does not return anything (or no output channel is configured), the command bus doesn't generate any output messages (it basically behaves like an outbound channel adapter in this case).
While any valid SpEL expression can be executed (for example #headers.timestamp
, which will return the timestamp of the command message), the intended use is to call managed operations or lifecycle methods of specific messaging components. For example, the expression @myInboundAdapter.stop()
will cause the inbound channel adapter with ID myInboundAdapter
to stop (i.e, it will stop producing messages). See the documentation for all supported operations.
Output channel
Output channel where any results of the execution of the command message are send to. If not configured, the control bus will not generate any output.
If this property is set and the executed command returns a non-null
result, this result object (or multiple result objects) is send as the payload of a message (or multiple messages) to the specified channel.
Optional
Input channel
Channel to consume the input messages from.
Required
Id
Name that uniquely identifies this flow component.
Required