Skip to content

Add .interceptor() to flow DSL #3204

@grubeninspekteur

Description

@grubeninspekteur

Enhancement

Consider introducing a .interceptor(ChannelInterceptor...) method to the flow builder for adding interceptors to the current (possibly implicit) channel. At the moment the best way to do this is

.channel(
    MessageChannels
        .directChannel()
        .interceptor(...)
  )

One could argue that this is a clear separation of concerns, however, wireTap has also been lifted up to the flow builder.

Example usage: Adding values to the Mapped Diagnostic Context (MDC) for incoming messages and cleaning up in ChannelInterceptor#afterSendCompletion.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions