Refactor SendTo and Subscription Method Return Value Handlers to use … by catturtle123 · Pull Request #36282 · spring-projects/spring-framework

PR Title

Propagate native STOMP headers to broker via HeaderFilter


Summary

This PR implements the propagation of native STOMP headers based on a predicate, as discussed in previous feedback. The core focus is ensuring that specific native headers (e.g., those with an x- prefix) are correctly carried over to the broker-bound messages.

Key Implementation Details:

  • Native Header Filtering: Configured addHeaderFilter to propagate native headers starting with the x- prefix to response messages.
  • Updated SendToMethodReturnValueHandler: Supports header propagation for @SendTo responses.
  • Updated SubscriptionMethodReturnValueHandler: Supports header propagation for @SubscribeMapping responses.
  • Updated unit tests to verify native header propagation via SimpMessageHeaderAccessor

Local Test (not included in this PR)

스크린샷 2026-02-10 오전 4 11 40


Related Issues