AmqpConfiguration

io.github.positionpal.connection.AmqpConfiguration

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class RabbitMQConfig(host: String, port: Int, virtualHost: String, username: String, password: String, ssl: Boolean)

Configuration settings for connecting to a RabbitMQ server.

Configuration settings for connecting to a RabbitMQ server.

Value parameters

host

The hostname of the RabbitMQ server. Must be a valid hostname.

password

The password for authentication. Must contain printable ASCII characters only and be up to 255 characters long.

port

The port number of the RabbitMQ server. Must be in the range 0 to 65535.

ssl

Whether to use SSL for the connection. Defaults to false.

username

The username for authentication. Must be between 3 and 30 characters and can contain alphanumeric characters, dots, underscores, and hyphens.

virtualHost

The virtual host to connect to. Defaults to an empty string. If set, must be a valid virtual host name.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum Validation

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

type ValidationResult[A] = ValidatedNec[Validation, A]

Value members

Concrete methods

def of(host: String, port: Int, virtualHost: String, username: String, password: String, ssl: Boolean): ValidationResult[RabbitMQConfig]

Constructs a validated RabbitMQ configuration object.

Constructs a validated RabbitMQ configuration object.

Value parameters

host

The hostname of the RabbitMQ server.

password

The password for authentication.

port

The port number of the RabbitMQ server.

ssl

Whether to use SSL for the connection. Defaults to false.

username

The username for authentication.

virtualHost

The virtual host to connect to.

Attributes

Returns

A ValidationResult containing a RabbitMQConfig object if all fields are valid, or a list of validation errors otherwise.

Extensions

Extensions

extension (config: RabbitMQConfig)
def toUri: String

Converts the RabbitMQ configuration into a URI string suitable for connection.

Converts the RabbitMQ configuration into a URI string suitable for connection.

Attributes

Returns

A URI string of the format: amqp[s]://username:password@host:port[/encodedVirtualHost]. The scheme will be amqps if SSL is enabled, otherwise amqp. The virtual host will be URL-encoded if specified and not /.