Exception: MarchHare::PossibleAuthenticationFailureError

Inherits:
Exception
  • Object
show all
Defined in:
lib/march_hare/exceptions.rb

Overview

Raised when RabbitMQ closes network connection before finalizing the connection, typically indicating authentication failure.

RabbitMQ versions beyond 3.2 use a better defined authentication failure notifications.

Direct Known Subclasses

AuthenticationFailureError

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (PossibleAuthenticationFailureError) initialize(username, vhost, password_length)

A new instance of PossibleAuthenticationFailureError



47
48
49
50
51
52
# File 'lib/march_hare/exceptions.rb', line 47

def initialize(username, vhost, password_length)
  @username = username
  @vhost    = vhost

  super("Authentication with RabbitMQ failed or RabbitMQ version used does not support AMQP 0-9-1. Username: #{username}, vhost: #{vhost}, password length: #{password_length}. Please check your configuration.")
end

Instance Attribute Details

- (Object) username (readonly)

Returns the value of attribute username



45
46
47
# File 'lib/march_hare/exceptions.rb', line 45

def username
  @username
end

- (Object) vhost (readonly)

Returns the value of attribute vhost



45
46
47
# File 'lib/march_hare/exceptions.rb', line 45

def vhost
  @vhost
end