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

#initialize(username, vhost, password_length) ⇒ PossibleAuthenticationFailureError

Returns 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

#usernameObject (readonly)

Returns the value of attribute username.



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

def username
  @username
end

#vhostObject (readonly)

Returns the value of attribute vhost.



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

def vhost
  @vhost
end