Class RabbitMqTransport

java.lang.Object
org.acemq.amqp.transport.rabbitmq.RabbitMqTransport
All Implemented Interfaces:
Transport

public final class RabbitMqTransport extends Object implements Transport
AMQP 0-9-1 transport backed by the RabbitMQ Java client.

Discovered through ServiceLoader, so putting this module on the classpath is all it takes for amqp:// URLs to work.

  • Constructor Details

    • RabbitMqTransport

      public RabbitMqTransport()
  • Method Details

    • scheme

      public String scheme()
      Specified by:
      scheme in interface Transport
      Returns:
      the URL scheme this transport handles, for example amqp or amqp10
    • schemes

      public Set<String> schemes()
      Description copied from interface: Transport
      Every scheme this transport answers to.

      Exists because amqps:// is the same transport as amqp:// with the connection encrypted, not a different one, and a library where the secure URL fails to resolve is a library that teaches people to use the insecure one.

      Specified by:
      schemes in interface Transport
      Returns:
      the schemes, which must include Transport.scheme()
    • name

      public String name()
      Specified by:
      name in interface Transport
      Returns:
      a short name for logs and diagnostics, such as rabbitmq
    • capabilities

      public Set<Capability> capabilities()
      Specified by:
      capabilities in interface Transport
      Returns:
      what brokers reachable through this transport can do
    • connect

      public TransportConnection connect(ConnectionConfig config)
      Description copied from interface: Transport
      Opens a connection.
      Specified by:
      connect in interface Transport
      Parameters:
      config - connection settings; ConnectionConfig.scheme() must match Transport.scheme()
      Returns:
      an open connection