Skip to content

Consider to deprecate and eventually remove a replyChannel feature on Inbound Gateways #3985

Closed as not planned
@artembilan

Description

@artembilan

See current documentation for replyChannel feature on the Inbound Gateway: https://docs.spring.io/spring-integration/docs/6.0.1/reference/html/messaging-endpoints.html#gateway-default-reply-channel.

From all the use-case I have met so far there is no anything what we could not do without this replyChannel feature:

  • We always can route back to the replyChannel header via simple bridge configuration. Or we can add an explicit router configuration for replyChannel header mapping...
  • It is better to be explicit with an auditing on a specific channel before sending to the replyChannel header. It happens in this order even now anyway - first replyChannel option, then bridge to the reply channel header.

The feature is so confusing and so limited to just a PubishSubscribeChannel, that it is probably better to not have it at all.
According to my experience from StackOveflow questions, people are always use this feature for Inbound Gateways (e.g. HTTP) which is not always a PubishSubscribeChannel and they are confused why their solution fails with round-robin dispatcher.
Another failed use-case an attempt to short-circuit a reply from nested sub-flows. This replyChannel feature leads to an assumption that sending a message to this channel would always lead back to the Inbound Gateway, which is not always true.
Really need to understand what is a replyChannel header anyway.

Without this replyChannel feature we would have only a single place of truth - a replyChannel header and all the target solutions would be more cleaner and consistent.
Perhaps even newcomers to the framework will digest request-reply pattern easier without any confusions what is that replyChannel feature about.

I won't mind to reject this ticket if there is really a decent use-case for replyChannel` feature which cannot be handled by other components in the framework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedThere won't be a fix for some reason

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions