Class AmqpEnvironmentBuilder

java.lang.Object
com.rabbitmq.client.amqp.impl.AmqpEnvironmentBuilder
All Implemented Interfaces:
EnvironmentBuilder

public class AmqpEnvironmentBuilder extends Object implements EnvironmentBuilder
Builder to create an Environment instance of the RabbitMQ AMQP 1.0 Java Client.
  • Constructor Details

    • AmqpEnvironmentBuilder

      public AmqpEnvironmentBuilder()
  • Method Details

    • executorService

      public AmqpEnvironmentBuilder executorService(ExecutorService executorService)
      Set executor service used for internal tasks (e.g. connection recovery).

      The library uses sensible defaults, override only in case of problems.

      Parameters:
      executorService - the executor service
      Returns:
      this builder instance
    • scheduledExecutorService

      public AmqpEnvironmentBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
      Set scheduled executor service used for internal tasks (e.g. connection recovery).

      The library uses sensible defaults, override only in case of problems.

      Parameters:
      scheduledExecutorService - the scheduled executor service
      Returns:
      this builder instance
    • publisherExecutorService

      public AmqpEnvironmentBuilder publisherExecutorService(ExecutorService publisherExecutorService)
      Set executor service used to deal with broker responses after processing outbound messages.

      The library uses sensible defaults, override only in case of problems.

      Parameters:
      publisherExecutorService - the executor service
      Returns:
      this builder instance
    • consumerExecutorService

      @Deprecated(forRemoval=true) public AmqpEnvironmentBuilder consumerExecutorService(ExecutorService consumerExecutorService)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Do not use anymore
      Deprecated, do not use anymore. Consumers do not use a polling loop anymore.

      Set executor service used for consumer loops.

      The library uses sensible defaults, override only in case of problems.

      Parameters:
      consumerExecutorService - the executor service
      Returns:
      this builder instance
    • metricsCollector

      public AmqpEnvironmentBuilder metricsCollector(MetricsCollector metricsCollector)
      Parameters:
      metricsCollector - the metrics collector
      Returns:
      this builder instance
      See Also:
    • observationCollector

      public AmqpEnvironmentBuilder observationCollector(ObservationCollector observationCollector)
      Parameters:
      observationCollector - the observation collector
      Returns:
      this builder instance
      See Also:
    • connectionSettings

      Returns connection settings shared by connection builders.

      These settings are optional, they are overridden with the appropriate methods in ConnectionBuilder.

      Returns:
      shared connection settings
      See Also:
    • build

      public Environment build()
      Create the environment instance.
      Specified by:
      build in interface EnvironmentBuilder
      Returns:
      the configured environment