Class RMQConnectionConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setPort

        public RMQConnectionConfig.Builder setPort​(int port)
        Set the target port.
        Parameters:
        port - the default port to use for connections
        Returns:
        the Builder
      • setVirtualHost

        public RMQConnectionConfig.Builder setVirtualHost​(String virtualHost)
        Set the virtual host.
        Parameters:
        virtualHost - the virtual host to use when connecting to the broker
        Returns:
        the Builder
      • setUserName

        public RMQConnectionConfig.Builder setUserName​(String username)
        Set the user name.
        Parameters:
        username - the AMQP user name to use when connecting to the broker
        Returns:
        the Builder
      • setPassword

        public RMQConnectionConfig.Builder setPassword​(String password)
        Set the password.
        Parameters:
        password - the password to use when connecting to the broker
        Returns:
        the Builder
      • setUri

        public RMQConnectionConfig.Builder setUri​(String uri)
        Convenience method for setting the fields in an AMQP URI: host, port, username, password and virtual host. If any part of the URI is omitted, the ConnectionFactory's corresponding variable is left unchanged.
        Parameters:
        uri - is the AMQP URI containing the data
        Returns:
        the Builder
      • setTopologyRecoveryEnabled

        public RMQConnectionConfig.Builder setTopologyRecoveryEnabled​(boolean topologyRecovery)
        Enables or disables topology recovery.
        Parameters:
        topologyRecovery - if true, enables topology recovery
        Returns:
        the Builder
      • setRequestedHeartbeat

        public RMQConnectionConfig.Builder setRequestedHeartbeat​(int requestedHeartbeat)
        Set the requested heartbeat.
        Parameters:
        requestedHeartbeat - the initially requested heartbeat interval, in seconds; zero for none
        Returns:
        the Builder
      • setRequestedFrameMax

        public RMQConnectionConfig.Builder setRequestedFrameMax​(int requestedFrameMax)
        Set the requested maximum frame size.
        Parameters:
        requestedFrameMax - initially requested maximum frame size, in octets; zero for unlimited
        Returns:
        the Builder
      • setRequestedChannelMax

        public RMQConnectionConfig.Builder setRequestedChannelMax​(int requestedChannelMax)
        Set the requested maximum channel number.
        Parameters:
        requestedChannelMax - initially requested maximum channel number; zero for unlimited
      • setNetworkRecoveryInterval

        public RMQConnectionConfig.Builder setNetworkRecoveryInterval​(int networkRecoveryInterval)
        Sets connection recovery interval. Default is 5000.
        Parameters:
        networkRecoveryInterval - how long will automatic recovery wait before attempting to reconnect, in ms
        Returns:
        the Builder
      • setConnectionTimeout

        public RMQConnectionConfig.Builder setConnectionTimeout​(int connectionTimeout)
        Set the connection timeout.
        Parameters:
        connectionTimeout - connection establishment timeout in milliseconds; zero for infinite
        Returns:
        the Builder
      • setAutomaticRecovery

        public RMQConnectionConfig.Builder setAutomaticRecovery​(boolean automaticRecovery)
        Enables or disables automatic connection recovery.
        Parameters:
        automaticRecovery - if true, enables connection recovery
        Returns:
        the Builder
      • setPrefetchCount

        public RMQConnectionConfig.Builder setPrefetchCount​(int prefetchCount)
        Enables setting basicQos for the consumer channel. Only applicable to the RMQSource. Set to 0 for unlimited, which is the default.
        Parameters:
        prefetchCount - the max number of messages to receive without acknowledgement.
        Returns:
        the Builder
        See Also:
        Consumer Prefetch, Channel Prefetch (QoS)
      • setDeliveryTimeout

        public RMQConnectionConfig.Builder setDeliveryTimeout​(long deliveryTimeout)
        Enables setting the message delivery timeout in the queueing consumer. Only applicable to the RMQSource. If not set it will default to 30000.
        Parameters:
        deliveryTimeout - maximum wait time, in milliseconds, for the next message delivery
        Returns:
        the Builder
      • setDeliveryTimeout

        public RMQConnectionConfig.Builder setDeliveryTimeout​(long deliveryTimeout,
                                                              TimeUnit unit)
        Enables setting the message delivery timeout in the queueing consumer. Only applicable to the RMQSource. If not set it will default to 30 seconds.
        Parameters:
        deliveryTimeout - maximum wait time for the next message delivery
        unit - deliveryTimeout unit
        Returns:
        the Builder