org.springframework.boot.autoconfigure.amqp

Class RabbitProperties



  • @ConfigurationProperties(prefix="spring.rabbitmq")
    public class RabbitProperties
    extends Object
    Configuration properties for Rabbit.
    Author:
    Greg Turnquist, Dave Syer, Stephane Nicoll, Andy Wilkinson, Josh Thornhill, Gary Russell
    • Constructor Detail

      • RabbitProperties

        public RabbitProperties()
    • Method Detail

      • getHost

        public String getHost()
      • determineHost

        public String determineHost()
        Returns the host from the first address, or the configured host if no addresses have been set.
        Returns:
        the host
        See Also:
        setAddresses(String), getHost()
      • setHost

        public void setHost(String host)
      • getPort

        public int getPort()
      • determinePort

        public int determinePort()
        Returns the port from the first address, or the configured port if no addresses have been set.
        Returns:
        the port
        See Also:
        setAddresses(String), getPort()
      • setPort

        public void setPort(int port)
      • getAddresses

        public String getAddresses()
      • determineAddresses

        public String determineAddresses()
        Returns the comma-separated addresses or a single address (host:port) created from the configured host and port if no addresses have been set.
        Returns:
        the addresses
      • setAddresses

        public void setAddresses(String addresses)
      • getUsername

        public String getUsername()
      • determineUsername

        public String determineUsername()
        If addresses have been set and the first address has a username it is returned. Otherwise returns the result of calling getUsername().
        Returns:
        the username
        See Also:
        setAddresses(String), getUsername()
      • setUsername

        public void setUsername(String username)
      • getPassword

        public String getPassword()
      • determinePassword

        public String determinePassword()
        If addresses have been set and the first address has a password it is returned. Otherwise returns the result of calling getPassword().
        Returns:
        the password or null
        See Also:
        setAddresses(String), getPassword()
      • setPassword

        public void setPassword(String password)
      • getVirtualHost

        public String getVirtualHost()
      • determineVirtualHost

        public String determineVirtualHost()
        If addresses have been set and the first address has a virtual host it is returned. Otherwise returns the result of calling getVirtualHost().
        Returns:
        the virtual host or null
        See Also:
        setAddresses(String), getVirtualHost()
      • setVirtualHost

        public void setVirtualHost(String virtualHost)
      • getRequestedHeartbeat

        public Duration getRequestedHeartbeat()
      • setRequestedHeartbeat

        public void setRequestedHeartbeat(Duration requestedHeartbeat)
      • isPublisherConfirms

        public boolean isPublisherConfirms()
      • setPublisherConfirms

        public void setPublisherConfirms(boolean publisherConfirms)
      • isPublisherReturns

        public boolean isPublisherReturns()
      • setPublisherReturns

        public void setPublisherReturns(boolean publisherReturns)
      • getConnectionTimeout

        public Duration getConnectionTimeout()
      • setConnectionTimeout

        public void setConnectionTimeout(Duration connectionTimeout)