Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16801

Add description for StompBrokerRelayMessageHandler


    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 5.0.7, 5.1 RC1
    • Component/s: Messaging:WebSocket
    • Labels:
    • Last commented by a User:


      Currently the StompBrokerRelayMessageHandler uses the relayHost and relayPort in its toString method and also when connecting the "system" session (here).

      In case no custom TcpOperations are provided then this is all good. However, if one needs to provide customized TcpOperations then the information that is logged is misleading.

      Currently I misusing the relayHost to put my custom information (like the list of the round robin addresses). However, this is quite brittle, as it relays on the fact that I know how the internals of the StompBrokerRelayMessageHandler are done and the fact that those fields are not used when custom TcpOperations are provided.

      I would propose to add a description to the StompBrokerRelayMessageHandler to allow the callers to provide customization for this information. Of course this would also require to add that to StompBrokerRelayRegistration in order to be able to pass it to the message handler. The description can even be a Supplier, which would allow to provide even more accurate information (in combination with the ClientOptions.Builder<?> that can be passed to the ReactorNettyTcpClient)

      An additional benefit of this would be in the case when a Spring Boot actuator endpoint is used where one can use the BrokerAvailabilityEvent to show the up / down status for STOMP. This is not yet part of Boot, but we have a custom endpoint that does this.


          Issue Links



              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                filiphr Filip Hrisafov
                Last updater:
                Stéphane Nicoll
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created:
                  Days since last comment:
                  21 weeks, 5 days ago