类 StompBrokerRelayRegistration

    • 方法详细资料

      • setSystemLogin

        public StompBrokerRelayRegistration setSystemLogin​(String login)
        Set the login for the shared "system" connection used to send messages to the STOMP broker from within the application, i.e. messages not associated with a specific client session (e.g. REST/HTTP request handling method).

        By default this is set to "guest".

      • setSystemPasscode

        public StompBrokerRelayRegistration setSystemPasscode​(String passcode)
        Set the passcode for the shared "system" connection used to send messages to the STOMP broker from within the application, i.e. messages not associated with a specific client session (e.g. REST/HTTP request handling method).

        By default this is set to "guest".

      • setSystemHeartbeatSendInterval

        public StompBrokerRelayRegistration setSystemHeartbeatSendInterval​(long systemHeartbeatSendInterval)
        Set the interval, in milliseconds, at which the "system" relay session will, in the absence of any other data being sent, send a heartbeat to the STOMP broker. A value of zero will prevent heartbeats from being sent to the broker.

        The default value is 10000.

      • setSystemHeartbeatReceiveInterval

        public StompBrokerRelayRegistration setSystemHeartbeatReceiveInterval​(long heartbeatReceiveInterval)
        Set the maximum interval, in milliseconds, at which the "system" relay session expects, in the absence of any other data, to receive a heartbeat from the STOMP broker. A value of zero will configure the relay session to expect not to receive heartbeats from the broker.

        The default value is 10000.

      • setVirtualHost

        public StompBrokerRelayRegistration setVirtualHost​(String virtualHost)
        Set the value of the "host" header to use in STOMP CONNECT frames. When this property is configured, a "host" header will be added to every STOMP frame sent to the STOMP broker. This may be useful for example in a cloud environment where the actual host to which the TCP connection is established is different from the host providing the cloud-based STOMP service.

        By default this property is not set.

      • setTcpClient

        public void setTcpClient​(TcpOperations<byte[]> tcpClient)
        Configure a TCP client for managing TCP connections to the STOMP broker. By default Reactor2TcpClient is used.

        Note: when this property is used, any host or port specified are effectively ignored.

        从以下版本开始:
        4.3.15
      • setUserDestinationBroadcast

        public StompBrokerRelayRegistration setUserDestinationBroadcast​(String destination)
        Set a destination to broadcast messages to user destinations that remain unresolved because the user appears not to be connected. In a multi-application server scenario this gives other application servers a chance to try.

        By default this is not set.

        参数:
        destination - the destination to broadcast unresolved messages to, e.g. "/topic/unresolved-user-destination"
      • setUserRegistryBroadcast

        public StompBrokerRelayRegistration setUserRegistryBroadcast​(String destination)
        Set a destination to broadcast the content of the local user registry to and to listen for such broadcasts from other servers. In a multi-application server scenarios this allows each server's user registry to be aware of users connected to other servers.

        By default this is not set.

        参数:
        destination - the destination for broadcasting user registry details, e.g. "/topic/simp-user-registry".