The final idea is to be able to balance the load of the Stomp cluster, by grouping all sessions from the same user in the same Stomp Broker Relay server.
In order to achieve this, the very bare minimum is to gain access to the session Id at the TcpClient#doOnConnect callbacks, in order to customize from there the specific instance of the TcpClient#remoteAddress supplier.
Of course, passing on the whole StompHeaderAccessor from StompBrokerRelayMessageHandler#handleMessageInternal to ReactorNettyTcpClient may be better for my case, but it may perhaps make the average usages a bit more complicated.
I am very much open for suggestions or discussions on this matter.
This solves #25889 .
Comment From: pivotal-issuemaster
@rupebac Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@rupebac Thank you for signing the Contributor License Agreement!
Comment From: rstoyanchev
Closing as per https://github.com/spring-projects/spring-framework/issues/25889#issuecomment-712430506. Thanks for the suggestion.