ruby_rabbitmq_janus 2.0.0 → 2.1.0.pre.128

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -3
  3. data/Rakefile +98 -0
  4. data/config/default.md +6 -3
  5. data/config/default.yml +7 -1
  6. data/lib/generators/ruby_rabbitmq_janus/install_generator.rb +3 -0
  7. data/lib/generators/ruby_rabbitmq_janus/migration_generator.rb +30 -0
  8. data/lib/generators/ruby_rabbitmq_janus/templates/migration.rb +14 -0
  9. data/lib/rrj/admin.rb +2 -0
  10. data/lib/rrj/errors/base/admin.rb +24 -0
  11. data/lib/rrj/errors/base/base.rb +5 -0
  12. data/lib/rrj/errors/base/init.rb +46 -0
  13. data/lib/rrj/errors/base/task.rb +32 -0
  14. data/lib/rrj/errors/error.rb +4 -3
  15. data/lib/rrj/errors/janus/janus.rb +20 -7
  16. data/lib/rrj/errors/janus/messages/admin.rb +33 -0
  17. data/lib/rrj/errors/janus/messages/message.rb +51 -0
  18. data/lib/rrj/errors/janus/messages/standard.rb +33 -0
  19. data/lib/rrj/errors/janus/processus/concurency.rb +23 -0
  20. data/lib/rrj/errors/janus/processus/event.rb +30 -0
  21. data/lib/rrj/errors/janus/processus/keepalive.rb +33 -0
  22. data/lib/rrj/errors/janus/responses/admin.rb +39 -0
  23. data/lib/rrj/errors/janus/responses/event.rb +46 -0
  24. data/lib/rrj/errors/janus/responses/response.rb +44 -0
  25. data/lib/rrj/errors/janus/responses/standard.rb +58 -0
  26. data/lib/rrj/errors/janus/transactions/admin.rb +37 -0
  27. data/lib/rrj/errors/janus/transactions/handle.rb +52 -0
  28. data/lib/rrj/errors/janus/transactions/session.rb +38 -0
  29. data/lib/rrj/errors/janus/transactions/transaction.rb +23 -0
  30. data/lib/rrj/errors/rabbit/connect.rb +58 -0
  31. data/lib/rrj/errors/rabbit/propertie.rb +37 -0
  32. data/lib/rrj/errors/rabbit/publish/admin.rb +30 -0
  33. data/lib/rrj/errors/rabbit/publish/base_publisher.rb +23 -0
  34. data/lib/rrj/errors/rabbit/publish/exclusive.rb +31 -0
  35. data/lib/rrj/errors/rabbit/publish/listener.rb +30 -0
  36. data/lib/rrj/errors/rabbit/publish/non_exclusive.rb +31 -0
  37. data/lib/rrj/errors/rabbit/publish/publisher.rb +30 -0
  38. data/lib/rrj/errors/rabbit/rabbit.rb +14 -23
  39. data/lib/rrj/errors/tools/gem/cluster.rb +44 -0
  40. data/lib/rrj/errors/tools/gem/config.rb +89 -0
  41. data/lib/rrj/errors/tools/gem/log.rb +86 -0
  42. data/lib/rrj/errors/tools/gem/option.rb +37 -0
  43. data/lib/rrj/errors/tools/gem/request.rb +23 -0
  44. data/lib/rrj/errors/tools/replaces/replace.rb +30 -0
  45. data/lib/rrj/errors/tools/replaces/type.rb +30 -0
  46. data/lib/rrj/errors/tools/tools.rb +21 -1
  47. data/lib/rrj/info.rb +1 -1
  48. data/lib/rrj/init.rb +22 -4
  49. data/lib/rrj/janus/messages/admin.rb +9 -4
  50. data/lib/rrj/janus/messages/message.rb +20 -9
  51. data/lib/rrj/janus/messages/standard.rb +8 -2
  52. data/lib/rrj/janus/processus/concurrency.rb +2 -0
  53. data/lib/rrj/janus/processus/event.rb +8 -0
  54. data/lib/rrj/janus/processus/keepalive.rb +15 -23
  55. data/lib/rrj/janus/responses/admin.rb +6 -0
  56. data/lib/rrj/janus/responses/event.rb +8 -0
  57. data/lib/rrj/janus/responses/response.rb +8 -11
  58. data/lib/rrj/janus/responses/standard.rb +12 -0
  59. data/lib/rrj/janus/transactions/admin.rb +6 -0
  60. data/lib/rrj/janus/transactions/handle.rb +25 -3
  61. data/lib/rrj/janus/transactions/session.rb +6 -0
  62. data/lib/rrj/janus/transactions/transaction.rb +3 -9
  63. data/lib/rrj/models/active_record.rb +14 -0
  64. data/lib/rrj/models/concerns/janus_instance_concern.rb +47 -0
  65. data/lib/rrj/models/mongoid.rb +19 -0
  66. data/lib/rrj/rabbit/connect.rb +12 -8
  67. data/lib/rrj/rabbit/propertie.rb +23 -6
  68. data/lib/rrj/rabbit/publish/admin.rb +4 -0
  69. data/lib/rrj/rabbit/publish/base_publisher.rb +2 -1
  70. data/lib/rrj/rabbit/publish/exclusive.rb +4 -0
  71. data/lib/rrj/rabbit/publish/listener.rb +6 -0
  72. data/lib/rrj/rabbit/publish/non_exclusive.rb +4 -0
  73. data/lib/rrj/rabbit/publish/publisher.rb +4 -4
  74. data/lib/rrj/railtie.rb +15 -0
  75. data/lib/rrj/task.rb +51 -0
  76. data/lib/rrj/tools/gem/cluster.rb +65 -0
  77. data/lib/rrj/tools/gem/config.rb +38 -6
  78. data/lib/rrj/tools/gem/log.rb +24 -4
  79. data/lib/rrj/tools/gem/option.rb +21 -17
  80. data/lib/rrj/tools/gem/requests.rb +11 -7
  81. data/lib/rrj/tools/replaces/replace.rb +4 -0
  82. data/lib/rrj/tools/replaces/type.rb +4 -0
  83. data/lib/rrj/tools/tools.rb +1 -0
  84. data/lib/ruby_rabbitmq_janus.rb +3 -0
  85. data/lib/tasks/delete_all_instance.rake +12 -0
  86. data/spec/request/admin/request_handle_info_spec.rb +4 -3
  87. data/spec/request/admin/request_handles_spec.rb +4 -3
  88. data/spec/request/peer/request_trickle_spec.rb +1 -1
  89. data/spec/rrj/rabbit/propertie_spec.rb +37 -2
  90. data/spec/rrj/tools/gem/rrj_cluster_spec.rb +26 -0
  91. data/spec/rrj/tools/gem/rrj_config_spec.rb +78 -0
  92. data/spec/rrj/tools/gem/rrj_log_spec.rb +55 -0
  93. data/spec/rrj/tools/{replace_admin_spec.rb → replace/replace_admin_spec.rb} +0 -0
  94. data/spec/rrj/tools/{replace_handle_spec.rb → replace/replace_handle_spec.rb} +0 -0
  95. data/spec/rrj/tools/{replace_session_spec.rb → replace/replace_session_spec.rb} +0 -0
  96. data/spec/rrj/tools/{replace_spec.rb → replace/replace_spec.rb} +0 -0
  97. data/spec/rrj/tools/{type_spec.rb → replace/type_spec.rb} +0 -0
  98. data/spec/spec_helper.rb +33 -2
  99. data/spec/support/examples_config.rb +10 -0
  100. data/spec/support/examples_message.rb +0 -2
  101. data/spec/support/examples_request.rb +4 -4
  102. data/spec/support/schemas/config/config.json +4 -2
  103. data/spec/support/schemas/config/rabbit_options.json +1 -1
  104. data/spec/support/schemas/config/rabbit_options2.json +13 -0
  105. data/spec/support/schemas/config/rabbit_options_admin.json +1 -1
  106. data/spec/support/schemas/config/rabbit_options_admin2.json +13 -0
  107. metadata +98 -17
  108. data/lib/rrj/errors/init.rb +0 -69
  109. data/lib/rrj/errors/janus/janus_message.rb +0 -53
  110. data/lib/rrj/errors/janus/janus_processus_keepalive.rb +0 -48
  111. data/lib/rrj/errors/janus/janus_response.rb +0 -89
  112. data/lib/rrj/errors/janus/janus_transaction.rb +0 -29
  113. data/lib/rrj/errors/tools/config.rb +0 -43
  114. data/spec/rrj/rrj_config_spec.rb +0 -67
  115. data/spec/rrj/rrj_log_spec.rb +0 -16
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Janus
6
+ # Define a super class for all errors in
7
+ # Janus::Transactions::TransactionSessions
8
+ class BaseTransactionSessions < BaseTransaction
9
+ def initialize(message, level = :fatal)
10
+ super "[Sessions] #{message}", level
11
+ end
12
+ end
13
+
14
+ module TransactionSessions
15
+ # Error for Janus::Transactions::TransactionSessions#initialize
16
+ class Initialize < BaseTransactionSessions
17
+ def initialize
18
+ super 'Error in initializer'
19
+ end
20
+ end
21
+
22
+ # Error for Janus::Transactions::TransactionSessions#connect
23
+ class Connect < BaseTransactionSessions
24
+ def initialize
25
+ super 'Error for connect to RabbitMQ'
26
+ end
27
+ end
28
+
29
+ # Error for Janus::Transactions::TransactionSessions#publish_message
30
+ class PublishMessage < BaseTransactionSessions
31
+ def initialize
32
+ super 'Error for publishing message'
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Janus
6
+ # Define a super class for all errors in Janus::Transactions::Transaction
7
+ class BaseTransaction < BaseJanus
8
+ def initialize(message, level = :fatal)
9
+ super "[Transaction] #{message}", level
10
+ end
11
+ end
12
+
13
+ module Transaction
14
+ # Error for Janus::Transactions::Transaction#initialize
15
+ class Initialize < RubyRabbitmqJanus::Errors::Janus::BaseTransaction
16
+ def initialize
17
+ super 'Error in initializer'
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all error in Option class
7
+ class BaseConnect < BaseRabbit
8
+ def initialize(message, level = :fatal)
9
+ super("[Connect] #{message}", level)
10
+ end
11
+ end
12
+
13
+ module Connect
14
+ # Error for Rabbit::Connect#initialize
15
+ class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
16
+ def initialize
17
+ super 'Error in initializer'
18
+ end
19
+ end
20
+
21
+ # Error for Rabbit::Connect#transaction_short
22
+ class TransactionShort < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
23
+ def initialize
24
+ super 'Error during transaction with RabbitMQ'
25
+ end
26
+ end
27
+
28
+ # Error for Rabbit::Connect#transaction_long
29
+ class TransactionLong < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
30
+ def initialize
31
+ super 'Error during transaction with RabbitMQ'
32
+ end
33
+ end
34
+
35
+ # Error for Rabbit::Connect#start
36
+ class Start < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
37
+ def initialize
38
+ super 'Error for starting connection with RabbitMQ'
39
+ end
40
+ end
41
+
42
+ # Error for Rabbit::Connect#close
43
+ class Close < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
44
+ def initialize
45
+ super 'Error for closing connection with RabbitMQ'
46
+ end
47
+ end
48
+
49
+ # Error for Rabbit::Connect#channel
50
+ class Channel < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
51
+ def initialize
52
+ super 'Error for create channel in RabbitMQ instance'
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all error in Option class
7
+ class BasePropertie < BaseRabbit
8
+ def initialize(message, level = :fatal)
9
+ super("[Propertie] #{message}", level)
10
+ end
11
+ end
12
+
13
+ module Propertie
14
+ # Error for Rabbit::Propertie#initialize
15
+ class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BasePropertie
16
+ def initialize
17
+ super 'Error in initializer'
18
+ end
19
+ end
20
+
21
+ # Error for Rabbit::Propertie#options
22
+ class Options < RubyRabbitmqJanus::Errors::Rabbit::BasePropertie
23
+ def initialize
24
+ super 'Error for create hash to propertie message'
25
+ end
26
+ end
27
+
28
+ # Error for Rabbit::Propertie#options_admin
29
+ class OptionsAdmin < RubyRabbitmqJanus::Errors::Rabbit::BasePropertie
30
+ def initialize
31
+ super 'Error for create hash to propertie message admin'
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all errors in Rabbit::Publisher::PublisherAdmin
7
+ class BasePublisherAdmin < BaseErrorPublisher
8
+ def initialize(message, level = :fatal)
9
+ super "[Admin] #{message}", level
10
+ end
11
+ end
12
+
13
+ module PublisherAdmin
14
+ # Error for Rabbit::Publisher::PublisherAdmin#initialize
15
+ class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BasePublisherAdmin
16
+ def initialize
17
+ super 'Error in initializer'
18
+ end
19
+ end
20
+
21
+ # Error for Rabbit::Publisher::PublisherAdmin#publish
22
+ class Publish < RubyRabbitmqJanus::Errors::Rabbit::BasePublisherAdmin
23
+ def initialize
24
+ super 'Error for publish message'
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all errors in Rabbit::Publisher::BasePublisher
7
+ class BaseErrorPublisher < BaseRabbit
8
+ def initialize(message, level = :fatal)
9
+ super "[Publisher] #{message}", level
10
+ end
11
+ end
12
+
13
+ module BasePublisher
14
+ # Error for Rabbit::Publisher::BasePublisher#initialize
15
+ class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BaseErrorPublisher
16
+ def initialize
17
+ super 'Error in initializer'
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all errors in
7
+ # Rabbit::Publisher::PublishExclusive
8
+ class BasePublishExclusive < BaseErrorPublisher
9
+ def initialize(message, level = :fatal)
10
+ super "[Exclusive] #{message}", level
11
+ end
12
+ end
13
+
14
+ module PublishExclusive
15
+ # Error for Rabbit::Publisher::PublishExclusive#initialize
16
+ class Initialize < Errors::Rabbit::BasePublishExclusive
17
+ def initialize
18
+ super 'Error in initializer'
19
+ end
20
+ end
21
+
22
+ # Error for Rabbit::Publisher::PublishExclusive#publish
23
+ class Publish < Errors::Rabbit::BasePublishExclusive
24
+ def initialize
25
+ super 'Error for publish message'
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all errors in Rabbit::Publisher::Listener
7
+ class BaseListener < BaseErrorPublisher
8
+ def initialize(message, level = :fatal)
9
+ super "[Listener] #{message}", level
10
+ end
11
+ end
12
+
13
+ module Listener
14
+ # Error for Rabbit::Publisher::Listener#initialize
15
+ class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BaseListener
16
+ def initialize
17
+ super 'Error in initializer'
18
+ end
19
+ end
20
+
21
+ # Error for Rabbit::Publisher::Listener#listen_events
22
+ class ListenEvents < RubyRabbitmqJanus::Errors::Rabbit::BaseListener
23
+ def initialize
24
+ super 'Error for listen events in RabbitMQ public queue'
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all errors in
7
+ # Rabbit::Publisher::PublishNonExclusive
8
+ class BasePublishNonExclusive < BaseErrorPublisher
9
+ def initialize(message, level = :fatal)
10
+ super "[Non Exclusive] #{message}", level
11
+ end
12
+ end
13
+
14
+ module PublishNonExclusive
15
+ # Error for Rabbit::Publisher::PublishNonExclusive#initialize
16
+ class Initialize < Errors::Rabbit::BasePublishNonExclusive
17
+ def initialize
18
+ super 'Error in initializer'
19
+ end
20
+ end
21
+
22
+ # Error for Rabbit::Publisher::PublishNonExclusive#publish
23
+ class Publish < Errors::Rabbit::BasePublishNonExclusive
24
+ def initialize
25
+ super 'Error for publish message'
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Rabbit
6
+ # Define a super class for all errors in Rabbit::Publisher::Publish
7
+ class BasePublish < BaseErrorPublisher
8
+ def initialize(message, level = :fatal)
9
+ super "[Publisher] #{message}", level
10
+ end
11
+ end
12
+
13
+ module Publish
14
+ # Error for Rabbit::Publisher::Publish#initialize
15
+ class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BasePublish
16
+ def initialize
17
+ super 'Error in initializer'
18
+ end
19
+ end
20
+
21
+ # Error for Rabbit::Publisher::Publish#publish
22
+ class Publish < RubyRabbitmqJanus::Errors::Rabbit::BasePublish
23
+ def initialize
24
+ super 'Error for publish message'
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -2,30 +2,21 @@
2
2
 
3
3
  module RubyRabbitmqJanus
4
4
  module Errors
5
- # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
6
- #
7
- # Define errors if connection to rabbitmq is failed
8
- class ConnectionRabbitmqFailed < RRJError
9
- # Initialize a error for rabbit module. It's a fatal error
10
- #
11
- # @param [String] message Text returning in raise
12
- def initialize(message)
13
- super message, :fatal
14
- end
15
- end
16
-
17
- # Excepetion primary for Rabbit class
18
- class Rabbit < RRJError
19
- def initialize(message)
20
- super "[Rabbit]#{message}", :fatal
21
- end
22
- end
23
-
24
- # Send exception when publish a message to rabbitmq failed
25
- class RabbitPublishMessage < Rabbit
26
- def initialize(message, request)
27
- super "[Publish] #{message} -- #{request}"
5
+ # Define a super class for all error in module Rabbit
6
+ class BaseRabbit < RRJError
7
+ def initialize(message, level = :fatal)
8
+ super "[Rabbit]#{message}", level
28
9
  end
29
10
  end
30
11
  end
31
12
  end
13
+
14
+ require 'rrj/errors/rabbit/connect'
15
+ require 'rrj/errors/rabbit/propertie'
16
+
17
+ require 'rrj/errors/rabbit/publish/base_publisher'
18
+ require 'rrj/errors/rabbit/publish/admin'
19
+ require 'rrj/errors/rabbit/publish/exclusive'
20
+ require 'rrj/errors/rabbit/publish/listener'
21
+ require 'rrj/errors/rabbit/publish/non_exclusive'
22
+ require 'rrj/errors/rabbit/publish/publisher'
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRabbitmqJanus
4
+ module Errors
5
+ module Tools
6
+ # Define a super class for all error in Tools::Option class
7
+ class BaseCluster < BaseTools
8
+ def initialize(message, level = :fatal)
9
+ super("[Cluster] #{message}", level)
10
+ end
11
+ end
12
+
13
+ module Cluster
14
+ # Error for Tools::Option#initialize
15
+ class Initializer < RubyRabbitmqJanus::Errors::Tools::BaseCluster
16
+ def initialize
17
+ super 'Error in initializer', :fatal
18
+ end
19
+ end
20
+
21
+ # Error for Tools::Option#create_sessions
22
+ class CreateSessions < RubyRabbitmqJanus::Errors::Tools::BaseCluster
23
+ def initalize
24
+ super 'Error for creating sessions'
25
+ end
26
+ end
27
+
28
+ # Error for Tools::Option#queue_to
29
+ class QueueTo < RubyRabbitmqJanus::Errors::Tools::BaseCluster
30
+ def initalize
31
+ super 'Error for create string queue_to'
32
+ end
33
+ end
34
+
35
+ # Error for Tools::Option#queue_admin_to
36
+ class QueueAdminTo < RubyRabbitmqJanus::Errors::Tools::BaseCluster
37
+ def initalize
38
+ super 'Error for create string queue_admin_to'
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
4
+
5
+ module RubyRabbitmqJanus
6
+ module Errors
7
+ module Tools
8
+ # Define a super class for all error in class Config
9
+ class BaseConfig < BaseTools
10
+ def initialize(message, level = :fatal)
11
+ super("[Config] #{message}", level)
12
+ end
13
+ end
14
+
15
+ module Config
16
+ # Error for Tools::Config#initialize
17
+ class Initialize < RubyRabbitmqJanus::Errors::Tools::BaseConfig
18
+ def initialize
19
+ super 'Error in initalizer'
20
+ end
21
+ end
22
+
23
+ # Error for Tools::Config#queue_from
24
+ class QueueFrom < RubyRabbitmqJanus::Errors::Tools::BaseConfig
25
+ def initialize
26
+ super 'Error for reading standard queue from'
27
+ end
28
+ end
29
+
30
+ # Error for Tools::Config#queue_to
31
+ class QueueTo < RubyRabbitmqJanus::Errors::Tools::BaseConfig
32
+ def initialize
33
+ super 'Error for reading standard queue to'
34
+ end
35
+ end
36
+
37
+ # Error for config#queue_admin_from
38
+ class QueueAdminFrom < RubyRabbitmqJanus::Errors::Tools::BaseConfig
39
+ def initialize
40
+ super 'Error for reading admin queue from'
41
+ end
42
+ end
43
+
44
+ # Error for Tools::Config#queue_admin_to
45
+ class QueueAdminTo < RubyRabbitmqJanus::Errors::Tools::BaseConfig
46
+ def initialize
47
+ super 'Error for reading admin queue to'
48
+ end
49
+ end
50
+
51
+ # Error for Tools::Config#log_level
52
+ class LevelNotDefine < RubyRabbitmqJanus::Errors::Tools::BaseConfig
53
+ def initialize
54
+ super 'Error for reading option level', :warn
55
+ end
56
+ end
57
+
58
+ # Error for Tools::Config#time_to_live (or #ttl)
59
+ class TTLNotFound < RubyRabbitmqJanus::Errors::Tools::BaseConfig
60
+ def initialize
61
+ super 'Keepalive TTL option is not reading in config file', :warn
62
+ end
63
+ end
64
+
65
+ # Error for Tools::Config#plugin_at
66
+ class PluginAt < RubyRabbitmqJanus::Errors::Tools::BaseConfig
67
+ def initialize(parameter)
68
+ super 'Plugin is not found in configuration file, ' \
69
+ "with parameter #{parameter}", :warn
70
+ end
71
+ end
72
+
73
+ # Error for Tools::Config#cluster
74
+ class Cluster < RubyRabbitmqJanus::Errors::Tools::BaseConfig
75
+ def initialize
76
+ super 'Error for reading cluster enabled option', :fatal
77
+ end
78
+ end
79
+
80
+ # Error for Tools::Config#number_of_instance
81
+ class NumberOfinstance < RubyRabbitmqJanus::Errors::Tools::BaseConfig
82
+ def initialize
83
+ super 'Error for reading cluster instance count', :fatal
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end