Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .interceptor() to flow DSL #3204

Closed
grubeninspekteur opened this issue Feb 29, 2020 · 0 comments
Closed

Add .interceptor() to flow DSL #3204

grubeninspekteur opened this issue Feb 29, 2020 · 0 comments

Comments

@grubeninspekteur
Copy link
Contributor

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.

grubeninspekteur added a commit to grubeninspekteur/spring-integration that referenced this issue Feb 29, 2020
…ition

Adds an `interceptor()` builder method to register one or more
channel interceptors at the current flow position.

Fixes spring-projects#3204

* add `interceptor(ChannelInterceptor...)` to `BaseIntegrationFlowDefinition`
* refactor to reuse interceptable channel creation from `wireTap`
grubeninspekteur added a commit to grubeninspekteur/spring-integration that referenced this issue Mar 5, 2020
…ition

Adds an `intercept()` builder method to register one or more
channel interceptors at the current flow position.

Fixes spring-projects#3204

* add `intercept(ChannelInterceptor...)` to `BaseIntegrationFlowDefinition`
* refactor to reuse interceptable channel creation from `wireTap`
* document the new operator
@artembilan artembilan added this to the 5.3.M3 milestone Mar 5, 2020
@artembilan artembilan self-assigned this Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants