karafka 0.5.0.3 → 0.6.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.console_irbrc +13 -0
  3. data/.github/ISSUE_TEMPLATE.md +2 -0
  4. data/.gitignore +1 -0
  5. data/CHANGELOG.md +59 -1
  6. data/CODE_OF_CONDUCT.md +46 -0
  7. data/CONTRIBUTING.md +67 -0
  8. data/Gemfile +2 -1
  9. data/Gemfile.lock +46 -147
  10. data/README.md +51 -952
  11. data/Rakefile +5 -14
  12. data/karafka.gemspec +19 -13
  13. data/lib/karafka.rb +7 -4
  14. data/lib/karafka/app.rb +10 -6
  15. data/lib/karafka/attributes_map.rb +67 -0
  16. data/lib/karafka/base_controller.rb +42 -52
  17. data/lib/karafka/base_responder.rb +30 -14
  18. data/lib/karafka/base_worker.rb +11 -26
  19. data/lib/karafka/cli.rb +2 -0
  20. data/lib/karafka/cli/base.rb +2 -0
  21. data/lib/karafka/cli/console.rb +7 -1
  22. data/lib/karafka/cli/flow.rb +13 -13
  23. data/lib/karafka/cli/info.rb +7 -4
  24. data/lib/karafka/cli/install.rb +4 -3
  25. data/lib/karafka/cli/server.rb +3 -1
  26. data/lib/karafka/cli/worker.rb +2 -0
  27. data/lib/karafka/connection/config_adapter.rb +103 -0
  28. data/lib/karafka/connection/listener.rb +16 -12
  29. data/lib/karafka/connection/messages_consumer.rb +86 -0
  30. data/lib/karafka/connection/messages_processor.rb +74 -0
  31. data/lib/karafka/errors.rb +15 -29
  32. data/lib/karafka/fetcher.rb +10 -8
  33. data/lib/karafka/helpers/class_matcher.rb +2 -0
  34. data/lib/karafka/helpers/config_retriever.rb +46 -0
  35. data/lib/karafka/helpers/multi_delegator.rb +2 -0
  36. data/lib/karafka/loader.rb +4 -2
  37. data/lib/karafka/logger.rb +37 -36
  38. data/lib/karafka/monitor.rb +3 -1
  39. data/lib/karafka/params/interchanger.rb +2 -0
  40. data/lib/karafka/params/params.rb +34 -41
  41. data/lib/karafka/params/params_batch.rb +46 -0
  42. data/lib/karafka/parsers/json.rb +4 -2
  43. data/lib/karafka/patches/dry_configurable.rb +2 -0
  44. data/lib/karafka/process.rb +4 -2
  45. data/lib/karafka/responders/builder.rb +2 -0
  46. data/lib/karafka/responders/topic.rb +14 -6
  47. data/lib/karafka/routing/builder.rb +22 -59
  48. data/lib/karafka/routing/consumer_group.rb +54 -0
  49. data/lib/karafka/routing/mapper.rb +2 -0
  50. data/lib/karafka/routing/proxy.rb +37 -0
  51. data/lib/karafka/routing/router.rb +18 -16
  52. data/lib/karafka/routing/topic.rb +78 -0
  53. data/lib/karafka/schemas/config.rb +36 -0
  54. data/lib/karafka/schemas/consumer_group.rb +56 -0
  55. data/lib/karafka/schemas/responder_usage.rb +38 -0
  56. data/lib/karafka/server.rb +5 -3
  57. data/lib/karafka/setup/config.rb +79 -32
  58. data/lib/karafka/setup/configurators/base.rb +2 -0
  59. data/lib/karafka/setup/configurators/celluloid.rb +2 -0
  60. data/lib/karafka/setup/configurators/sidekiq.rb +2 -0
  61. data/lib/karafka/setup/configurators/water_drop.rb +15 -3
  62. data/lib/karafka/status.rb +2 -0
  63. data/lib/karafka/templates/app.rb.example +15 -5
  64. data/lib/karafka/templates/application_worker.rb.example +0 -6
  65. data/lib/karafka/version.rb +2 -1
  66. data/lib/karafka/workers/builder.rb +2 -0
  67. metadata +109 -60
  68. data/lib/karafka/cli/routes.rb +0 -36
  69. data/lib/karafka/connection/consumer.rb +0 -33
  70. data/lib/karafka/connection/message.rb +0 -17
  71. data/lib/karafka/connection/topic_consumer.rb +0 -94
  72. data/lib/karafka/responders/usage_validator.rb +0 -60
  73. data/lib/karafka/routing/route.rb +0 -113
  74. data/lib/karafka/setup/config_schema.rb +0 -44
  75. data/lib/karafka/setup/configurators/worker_glass.rb +0 -13
  76. data/lib/karafka/templates/config.ru.example +0 -13
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Karafka
4
+ module Schemas
5
+ # Consumer group topic validation rules
6
+ ConsumerGroupTopic = Dry::Validation.Schema do
7
+ required(:id).filled(:str?, format?: Karafka::Schemas::TOPIC_REGEXP)
8
+ required(:name).filled(:str?, format?: Karafka::Schemas::TOPIC_REGEXP)
9
+ required(:inline_processing).filled(:bool?)
10
+ required(:controller).filled
11
+ required(:parser).filled
12
+ required(:interchanger).filled
13
+ required(:max_bytes_per_partition).filled(:int?, gteq?: 0)
14
+ required(:start_from_beginning).filled(:bool?)
15
+ required(:batch_processing).filled(:bool?)
16
+ end
17
+
18
+ # Schema for single full route (consumer group + topics) validation.
19
+ ConsumerGroup = Dry::Validation.Schema do
20
+ required(:id).filled(:str?, format?: Karafka::Schemas::TOPIC_REGEXP)
21
+ required(:seed_brokers).filled(:array?)
22
+ required(:session_timeout).filled(:int?)
23
+ required(:offset_commit_interval).filled(:int?)
24
+ required(:offset_commit_threshold).filled(:int?)
25
+ required(:offset_retention_time) { none?.not > int? }
26
+ required(:heartbeat_interval).filled(:int?, gteq?: 0)
27
+ required(:topic_mapper).filled
28
+ required(:connect_timeout).filled(:int?, gt?: 0)
29
+ required(:socket_timeout).filled(:int?, gt?: 0)
30
+ required(:max_wait_time).filled(:int?, gteq?: 0)
31
+ required(:batch_consuming).filled(:bool?)
32
+ required(:topics).filled { each { schema(ConsumerGroupTopic) } }
33
+
34
+ # Max wait time cannot exceed socket_timeout - wouldn't make sense
35
+ rule(
36
+ max_wait_time_limit: %i[max_wait_time socket_timeout]
37
+ ) do |max_wait_time, socket_timeout|
38
+ socket_timeout.int? > max_wait_time.lteq?(value(:socket_timeout))
39
+ end
40
+
41
+ %i[
42
+ ssl_ca_cert
43
+ ssl_ca_cert_file_path
44
+ ssl_client_cert
45
+ ssl_client_cert_key
46
+ sasl_plain_authzid
47
+ sasl_plain_username
48
+ sasl_plain_password
49
+ sasl_gssapi_principal
50
+ sasl_gssapi_keytab
51
+ ].each do |encryption_attribute|
52
+ optional(encryption_attribute).maybe(:str?)
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Karafka
4
+ module Schemas
5
+ # Validator to check responder topic usage
6
+ ResponderUsageTopic = Dry::Validation.Schema do
7
+ required(:name).filled(:str?, format?: Karafka::Schemas::TOPIC_REGEXP)
8
+ required(:required).filled(:bool?)
9
+ required(:multiple_usage).filled(:bool?)
10
+ required(:usage_count).filled(:int?, gteq?: 0)
11
+ required(:registered).filled(eql?: true)
12
+
13
+ rule(
14
+ required_usage: %i[required usage_count]
15
+ ) do |required, usage_count|
16
+ required.true? > usage_count.gteq?(1)
17
+ end
18
+
19
+ rule(
20
+ multiple_usage_permission: %i[multiple_usage usage_count]
21
+ ) do |multiple_usage, usage_count|
22
+ usage_count.gt?(1) > multiple_usage.true?
23
+ end
24
+
25
+ rule(
26
+ multiple_usage_block: %i[multiple_usage usage_count]
27
+ ) do |multiple_usage, usage_count|
28
+ multiple_usage.false? > usage_count.lteq?(1)
29
+ end
30
+ end
31
+
32
+ # Validator to check that everything in a responder flow matches responder rules
33
+ ResponderUsage = Dry::Validation.Schema do
34
+ required(:used_topics) { filled? > each { schema(ResponderUsageTopic) } }
35
+ required(:registered_topics) { filled? > each { schema(ResponderUsageTopic) } }
36
+ end
37
+ end
38
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  # Karafka consuming server class
3
5
  class Server
@@ -27,7 +29,7 @@ module Karafka
27
29
  process.on_sigint do
28
30
  Karafka::App.stop!
29
31
  consumers.map(&:stop)
30
- exit
32
+ Kernel.exit
31
33
  end
32
34
  end
33
35
 
@@ -36,7 +38,7 @@ module Karafka
36
38
  process.on_sigquit do
37
39
  Karafka::App.stop!
38
40
  consumers.map(&:stop)
39
- exit
41
+ Kernel.exit
40
42
  end
41
43
  end
42
44
 
@@ -45,7 +47,7 @@ module Karafka
45
47
  process.on_sigterm do
46
48
  Karafka::App.stop!
47
49
  consumers.map(&:stop)
48
- exit
50
+ Kernel.exit
49
51
  end
50
52
  end
51
53
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  # Module containing all Karafka setup related elements like configuration settings,
3
5
  # config validations and configurators for external gems integration
@@ -13,46 +15,55 @@ module Karafka
13
15
  extend Dry::Configurable
14
16
 
15
17
  # Available settings
16
- # option name [String] current app name - used to provide default Kafka groups namespaces
17
- setting :name
18
- # If inline_mode is set to true, we won't enqueue jobs, instead we will run them immediately
19
- setting :inline_mode, false
18
+ # option client_id [String] kafka client_id - used to provide
19
+ # default Kafka groups namespaces and identify that app in kafka
20
+ setting :client_id
21
+ # If inline_processing is set to true, we won't enqueue jobs, instead we will run them
22
+ # immediately
23
+ setting :inline_processing, false
20
24
  # option logger [Instance] logger that we want to use
21
- setting :logger, ::Karafka::Logger.instance
25
+ setting :logger, -> { ::Karafka::Logger.instance }
22
26
  # option monitor [Instance] monitor that we will to use (defaults to Karafka::Monitor)
23
- setting :monitor, ::Karafka::Monitor.instance
27
+ setting :monitor, -> { ::Karafka::Monitor.instance }
24
28
  # option redis [Hash] redis options hash (url and optional parameters)
25
29
  # Note that redis could be rewriten using nested options, but it is a sidekiq specific
26
30
  # stuff and we don't want to touch it
27
31
  setting :redis
28
- # If batch_mode is true, incoming messages will be handled in batch, otherwsie one at a time.
29
- setting :batch_mode, false
30
- # whether to consume messages starting at the beginning or to just consume new messages
31
- setting :start_from_beginning, true
32
- # Mapper used to remap names of topics, so we can have a clean internal topic namings despite
33
- # using any Kafka provider that uses namespacing, etc
32
+ # Mapper used to remap names of topics, so we can have a clean internal topic namings
33
+ # despite using any Kafka provider that uses namespacing, etc
34
34
  # It needs to implement two methods:
35
35
  # - #incoming - for remapping from the incoming message to our internal format
36
36
  # - #outgoing - for remapping from internal topic name into outgoing message
37
- setting :topic_mapper, Routing::Mapper
38
-
37
+ setting :topic_mapper, -> { Routing::Mapper }
38
+ # If batch_consuming is true, we will consume kafka messages in batches instead of 1 by 1
39
+ # @note Consuming does not equal processing, see batch_processing description for details
40
+ setting :batch_consuming, true
41
+ # If batch_processing is true, we will have access to #params_batch instead of #params.
42
+ # #params_batch will contain params received from Kafka (may be more than 1) so we can
43
+ # process them in batches
44
+ setting :batch_processing, false
39
45
  # Connection pool options are used for producer (Waterdrop)
40
- # They are configured automatically based on Sidekiq concurrency and number of routes
46
+ # They are configured automatically based on Sidekiq concurrency and number of consumers
41
47
  # The bigger one is selected as we need to be able to send messages from both places
42
48
  setting :connection_pool do
43
49
  # Connection pool size for producers. Note that we take a bigger number because there
44
- # are cases when we might have more sidekiq threads than Karafka routes (small app)
50
+ # are cases when we might have more sidekiq threads than Karafka consumers (small app)
45
51
  # or the opposite for bigger systems
46
- setting :size, -> { [::Karafka::App.routes.count, Sidekiq.options[:concurrency]].max }
52
+ setting :size, lambda {
53
+ [
54
+ ::Karafka::App.consumer_groups.count,
55
+ Sidekiq.options[:concurrency]
56
+ ].max
57
+ }
47
58
  # How long should we wait for a working resource from the pool before rising timeout
48
59
  # With a proper connection pool size, this should never happen
49
60
  setting :timeout, 5
50
61
  end
51
62
 
52
- # option kafka [Hash] - optional - kafka configuration options (hosts)
63
+ # option kafka [Hash] - optional - kafka configuration options
53
64
  setting :kafka do
54
65
  # Array with at least one host
55
- setting :hosts
66
+ setting :seed_brokers
56
67
  # option session_timeout [Integer] the number of seconds after which, if a client
57
68
  # hasn't contacted the Kafka cluster, it will be kicked out of the group.
58
69
  setting :session_timeout, 30
@@ -66,22 +77,58 @@ module Karafka
66
77
  # option heartbeat_interval [Integer] the interval between heartbeats; must be less
67
78
  # than the session window.
68
79
  setting :heartbeat_interval, 10
69
-
80
+ # option max_bytes_per_partition [Integer] the maximum amount of data fetched
81
+ # from a single partition at a time.
82
+ setting :max_bytes_per_partition, 1_048_576
83
+ # whether to consume messages starting at the beginning or to just consume new messages
84
+ setting :start_from_beginning, true
85
+ # option min_bytes [Integer] the minimum number of bytes to read before
86
+ # returning messages from the server; if `max_wait_time` is reached, this
87
+ # is ignored.
88
+ setting :min_bytes, 1
89
+ # option max_wait_time [Integer, Float] the maximum duration of time to wait before
90
+ # returning messages from the server, in seconds.
91
+ setting :max_wait_time, 5
92
+ # option reconnect_timeout [Integer] How long should we wait before trying to reconnect to
93
+ # Kafka cluster that went down (in seconds)
94
+ setting :reconnect_timeout, 5
95
+ # option offset_retention_time [Integer] The length of the retention window, known as
96
+ # offset retention time
97
+ setting :offset_retention_time, nil
98
+ # option connect_timeout [Integer] Sets the number of seconds to wait while connecting to
99
+ # a broker for the first time. When ruby-kafka initializes, it needs to connect to at
100
+ # least one host.
101
+ setting :connect_timeout, 10
102
+ # option socket_timeout [Integer] Sets the number of seconds to wait when reading from or
103
+ # writing to a socket connection to a broker. After this timeout expires the connection
104
+ # will be killed. Note that some Kafka operations are by definition long-running, such as
105
+ # waiting for new messages to arrive in a partition, so don't set this value too low
106
+ setting :socket_timeout, 10
70
107
  # SSL authentication related settings
71
- setting :ssl do
72
- # option ca_cert [String] SSL CA certificate
73
- setting :ca_cert, nil
74
- # option client_cert [String] SSL client certificate
75
- setting :client_cert, nil
76
- # option client_cert_key [String] SSL client certificate password
77
- setting :client_cert_key, nil
78
- end
108
+ # option ca_cert [String] SSL CA certificate
109
+ setting :ssl_ca_cert, nil
110
+ # option ssl_ca_cert_file_path [String] SSL CA certificate file path
111
+ setting :ssl_ca_cert_file_path, nil
112
+ # option client_cert [String] SSL client certificate
113
+ setting :ssl_client_cert, nil
114
+ # option client_cert_key [String] SSL client certificate password
115
+ setting :ssl_client_cert_key, nil
116
+ # option sasl_gssapi_principal [String] sasl principal
117
+ setting :sasl_gssapi_principal, nil
118
+ # option sasl_gssapi_keytab [String] sasl keytab
119
+ setting :sasl_gssapi_keytab, nil
120
+ # option sasl_plain_authzid [String] The authorization identity to use
121
+ setting :sasl_plain_authzid, ''
122
+ # option sasl_plain_username [String] The username used to authenticate
123
+ setting :sasl_plain_username, nil
124
+ # option sasl_plain_password [String] The password used to authenticate
125
+ setting :sasl_plain_password, nil
79
126
  end
80
127
 
81
128
  # This is configured automatically, don't overwrite it!
82
- # Each route requires separate thread, so number of threads should be equal to number
83
- # of routes
84
- setting :concurrency, -> { ::Karafka::App.routes.count }
129
+ # Each consumer group requires separate thread, so number of threads should be equal to
130
+ # number of consumer groups
131
+ setting :concurrency, -> { ::Karafka::App.consumer_groups.count }
85
132
 
86
133
  class << self
87
134
  # Configurating method
@@ -107,7 +154,7 @@ module Karafka
107
154
  # @raise [Karafka::Errors::InvalidConfiguration] raised when configuration
108
155
  # doesn't match with ConfigurationSchema
109
156
  def validate!
110
- validation_result = Karafka::Setup::ConfigSchema.call(config.to_h)
157
+ validation_result = Karafka::Schemas::Config.call(config.to_h)
111
158
 
112
159
  return true if validation_result.success?
113
160
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  module Setup
3
5
  # Configurators module is used to enclose all the external dependencies configurations
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  module Setup
3
5
  class Configurators
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  module Setup
3
5
  class Configurators
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  module Setup
3
5
  class Configurators
@@ -5,12 +7,22 @@ module Karafka
5
7
  class WaterDrop < Base
6
8
  # Sets up a WaterDrop settings
7
9
  def setup
10
+ dynamic_params = Connection::ConfigAdapter.client(nil)
11
+
8
12
  ::WaterDrop.setup do |water_config|
9
13
  water_config.send_messages = true
10
- water_config.connection_pool_size = config.connection_pool.size
11
- water_config.connection_pool_timeout = config.connection_pool.timeout
12
- water_config.kafka.hosts = config.kafka.hosts
13
14
  water_config.raise_on_failure = true
15
+ water_config.connection_pool = config.connection_pool
16
+
17
+ # Automigration of all the attributes that should be accepted by waterdrop
18
+ # based on what we use in karafka ruby-kafka initialization
19
+ dynamic_params.each do |key, value|
20
+ key_assignment = :"#{key}="
21
+ # We decide whether we should set it on a kafka scope of waterdrop config or on the
22
+ # main scope
23
+ scope = water_config.kafka.respond_to?(key_assignment) ? :kafka : :itself
24
+ water_config.public_send(scope).public_send(key_assignment, value)
25
+ end
14
26
  end
15
27
  end
16
28
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  # App status monitor
3
5
  class Status
@@ -8,20 +8,30 @@ Karafka::Loader.new.load(Karafka::App.root)
8
8
  # App class
9
9
  class App < Karafka::App
10
10
  setup do |config|
11
- config.kafka.hosts = %w( 127.0.0.1:9092 )
12
- config.name = 'example_app'
11
+ config.kafka.seed_brokers = %w( 127.0.0.1:9092 )
12
+ config.client_id = 'example_app'
13
13
  config.redis = {
14
14
  url: 'redis://localhost:6379'
15
15
  }
16
- config.inline_mode = false
17
- config.batch_mode = false
16
+ config.inline_processing = Karafka.env.development?
17
+ config.batch_consuming = true
18
18
  end
19
19
 
20
- routes.draw do
20
+ consumer_groups.draw do
21
21
  # topic :example do
22
22
  # controller ExampleController
23
23
  # interchanger CustomInterchanger
24
24
  # end
25
+
26
+ # consumer_group :bigger_group do
27
+ # topic :test do
28
+ # controller TestController
29
+ # end
30
+ #
31
+ # topic :test2 do
32
+ # controller Test2Controller
33
+ # end
34
+ # end
25
35
  end
26
36
  end
27
37
 
@@ -3,10 +3,4 @@
3
3
  # Karafka with other frameworks). Karafka will use first direct descendant of Karafka::BaseWorker
4
4
  # to build worker classes
5
5
  class ApplicationWorker < Karafka::BaseWorker
6
- # You can disable WorkerGlass components if you want to
7
- prepend WorkerGlass::Timeout
8
- prepend WorkerGlass::Reentrancy
9
-
10
- # If you remove WorkerGlass::Timeout, this line will be useless as well
11
- self.timeout = 60
12
6
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # Main module namespace
3
4
  module Karafka
4
5
  # Current Karafka version
5
- VERSION = '0.5.0.3'
6
+ VERSION = '0.6.0.rc1'
6
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Karafka
2
4
  # Internal stuff related to workers
3
5
  module Workers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.3
4
+ version: 0.6.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -10,36 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-06-28 00:00:00.000000000 Z
13
+ date: 2017-08-15 00:00:00.000000000 Z
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: bundler
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - "~>"
20
- - !ruby/object:Gem::Version
21
- version: '1.2'
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - "~>"
27
- - !ruby/object:Gem::Version
28
- version: '1.2'
29
15
  - !ruby/object:Gem::Dependency
30
16
  name: ruby-kafka
31
17
  requirement: !ruby/object:Gem::Requirement
32
18
  requirements:
33
- - - '='
19
+ - - ">="
34
20
  - !ruby/object:Gem::Version
35
- version: 0.3.17
21
+ version: '0.4'
36
22
  type: :runtime
37
23
  prerelease: false
38
24
  version_requirements: !ruby/object:Gem::Requirement
39
25
  requirements:
40
- - - '='
26
+ - - ">="
41
27
  - !ruby/object:Gem::Version
42
- version: 0.3.17
28
+ version: '0.4'
43
29
  - !ruby/object:Gem::Dependency
44
30
  name: sidekiq
45
31
  requirement: !ruby/object:Gem::Requirement
@@ -54,34 +40,20 @@ dependencies:
54
40
  - - ">="
55
41
  - !ruby/object:Gem::Version
56
42
  version: '4.2'
57
- - !ruby/object:Gem::Dependency
58
- name: worker-glass
59
- requirement: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '0.2'
64
- type: :runtime
65
- prerelease: false
66
- version_requirements: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - "~>"
69
- - !ruby/object:Gem::Version
70
- version: '0.2'
71
43
  - !ruby/object:Gem::Dependency
72
44
  name: celluloid
73
45
  requirement: !ruby/object:Gem::Requirement
74
46
  requirements:
75
- - - "~>"
47
+ - - ">="
76
48
  - !ruby/object:Gem::Version
77
- version: '0.17'
49
+ version: '0'
78
50
  type: :runtime
79
51
  prerelease: false
80
52
  version_requirements: !ruby/object:Gem::Requirement
81
53
  requirements:
82
- - - "~>"
54
+ - - ">="
83
55
  - !ruby/object:Gem::Version
84
- version: '0.17'
56
+ version: '0'
85
57
  - !ruby/object:Gem::Dependency
86
58
  name: envlogic
87
59
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +72,28 @@ dependencies:
100
72
  name: waterdrop
101
73
  requirement: !ruby/object:Gem::Requirement
102
74
  requirements:
103
- - - "~>"
75
+ - - ">="
104
76
  - !ruby/object:Gem::Version
105
- version: 0.3.2.4
77
+ version: '0.4'
106
78
  type: :runtime
107
79
  prerelease: false
108
80
  version_requirements: !ruby/object:Gem::Requirement
109
81
  requirements:
110
- - - "~>"
82
+ - - ">="
111
83
  - !ruby/object:Gem::Version
112
- version: 0.3.2.4
84
+ version: '0.4'
113
85
  - !ruby/object:Gem::Dependency
114
86
  name: rake
115
87
  requirement: !ruby/object:Gem::Requirement
116
88
  requirements:
117
- - - "~>"
89
+ - - ">="
118
90
  - !ruby/object:Gem::Version
119
91
  version: '11.3'
120
92
  type: :runtime
121
93
  prerelease: false
122
94
  version_requirements: !ruby/object:Gem::Requirement
123
95
  requirements:
124
- - - "~>"
96
+ - - ">="
125
97
  - !ruby/object:Gem::Version
126
98
  version: '11.3'
127
99
  - !ruby/object:Gem::Dependency
@@ -142,14 +114,14 @@ dependencies:
142
114
  name: activesupport
143
115
  requirement: !ruby/object:Gem::Requirement
144
116
  requirements:
145
- - - "~>"
117
+ - - ">="
146
118
  - !ruby/object:Gem::Version
147
119
  version: '5.0'
148
120
  type: :runtime
149
121
  prerelease: false
150
122
  version_requirements: !ruby/object:Gem::Requirement
151
123
  requirements:
152
- - - "~>"
124
+ - - ">="
153
125
  - !ruby/object:Gem::Version
154
126
  version: '5.0'
155
127
  - !ruby/object:Gem::Dependency
@@ -158,14 +130,14 @@ dependencies:
158
130
  requirements:
159
131
  - - "~>"
160
132
  - !ruby/object:Gem::Version
161
- version: 0.10.6
133
+ version: '0.11'
162
134
  type: :runtime
163
135
  prerelease: false
164
136
  version_requirements: !ruby/object:Gem::Requirement
165
137
  requirements:
166
138
  - - "~>"
167
139
  - !ruby/object:Gem::Version
168
- version: 0.10.6
140
+ version: '0.11'
169
141
  - !ruby/object:Gem::Dependency
170
142
  name: dry-configurable
171
143
  requirement: !ruby/object:Gem::Requirement
@@ -180,7 +152,77 @@ dependencies:
180
152
  - - "~>"
181
153
  - !ruby/object:Gem::Version
182
154
  version: '0.7'
183
- description: " Framework used to simplify Apache Kafka based Ruby applications development "
155
+ - !ruby/object:Gem::Dependency
156
+ name: yajl-ruby
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: 1.3.0
162
+ type: :runtime
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: 1.3.0
169
+ - !ruby/object:Gem::Dependency
170
+ name: bundler
171
+ requirement: !ruby/object:Gem::Requirement
172
+ requirements:
173
+ - - "~>"
174
+ - !ruby/object:Gem::Version
175
+ version: '1.2'
176
+ type: :development
177
+ prerelease: false
178
+ version_requirements: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - "~>"
181
+ - !ruby/object:Gem::Version
182
+ version: '1.2'
183
+ - !ruby/object:Gem::Dependency
184
+ name: rspec
185
+ requirement: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '3.6'
190
+ type: :development
191
+ prerelease: false
192
+ version_requirements: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: '3.6'
197
+ - !ruby/object:Gem::Dependency
198
+ name: simplecov
199
+ requirement: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '0.14'
204
+ type: :development
205
+ prerelease: false
206
+ version_requirements: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '0.14'
211
+ - !ruby/object:Gem::Dependency
212
+ name: byebug
213
+ requirement: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ version: '0'
218
+ type: :development
219
+ prerelease: false
220
+ version_requirements: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - ">="
223
+ - !ruby/object:Gem::Version
224
+ version: '0'
225
+ description: Framework used to simplify Apache Kafka based Ruby applications development
184
226
  email:
185
227
  - maciej@coditsu.io
186
228
  - pavlo.vavruk@gmail.com
@@ -190,12 +232,16 @@ executables:
190
232
  extensions: []
191
233
  extra_rdoc_files: []
192
234
  files:
235
+ - ".console_irbrc"
236
+ - ".github/ISSUE_TEMPLATE.md"
193
237
  - ".gitignore"
194
238
  - ".rspec"
195
239
  - ".ruby-gemset"
196
240
  - ".ruby-version"
197
241
  - ".travis.yml"
198
242
  - CHANGELOG.md
243
+ - CODE_OF_CONDUCT.md
244
+ - CONTRIBUTING.md
199
245
  - Gemfile
200
246
  - Gemfile.lock
201
247
  - MIT-LICENCE
@@ -205,6 +251,7 @@ files:
205
251
  - karafka.gemspec
206
252
  - lib/karafka.rb
207
253
  - lib/karafka/app.rb
254
+ - lib/karafka/attributes_map.rb
208
255
  - lib/karafka/base_controller.rb
209
256
  - lib/karafka/base_responder.rb
210
257
  - lib/karafka/base_worker.rb
@@ -214,46 +261,48 @@ files:
214
261
  - lib/karafka/cli/flow.rb
215
262
  - lib/karafka/cli/info.rb
216
263
  - lib/karafka/cli/install.rb
217
- - lib/karafka/cli/routes.rb
218
264
  - lib/karafka/cli/server.rb
219
265
  - lib/karafka/cli/worker.rb
220
- - lib/karafka/connection/consumer.rb
266
+ - lib/karafka/connection/config_adapter.rb
221
267
  - lib/karafka/connection/listener.rb
222
- - lib/karafka/connection/message.rb
223
- - lib/karafka/connection/topic_consumer.rb
268
+ - lib/karafka/connection/messages_consumer.rb
269
+ - lib/karafka/connection/messages_processor.rb
224
270
  - lib/karafka/errors.rb
225
271
  - lib/karafka/fetcher.rb
226
272
  - lib/karafka/helpers/class_matcher.rb
273
+ - lib/karafka/helpers/config_retriever.rb
227
274
  - lib/karafka/helpers/multi_delegator.rb
228
275
  - lib/karafka/loader.rb
229
276
  - lib/karafka/logger.rb
230
277
  - lib/karafka/monitor.rb
231
278
  - lib/karafka/params/interchanger.rb
232
279
  - lib/karafka/params/params.rb
280
+ - lib/karafka/params/params_batch.rb
233
281
  - lib/karafka/parsers/json.rb
234
282
  - lib/karafka/patches/dry_configurable.rb
235
283
  - lib/karafka/process.rb
236
284
  - lib/karafka/responders/builder.rb
237
285
  - lib/karafka/responders/topic.rb
238
- - lib/karafka/responders/usage_validator.rb
239
286
  - lib/karafka/routing/builder.rb
287
+ - lib/karafka/routing/consumer_group.rb
240
288
  - lib/karafka/routing/mapper.rb
241
- - lib/karafka/routing/route.rb
289
+ - lib/karafka/routing/proxy.rb
242
290
  - lib/karafka/routing/router.rb
291
+ - lib/karafka/routing/topic.rb
292
+ - lib/karafka/schemas/config.rb
293
+ - lib/karafka/schemas/consumer_group.rb
294
+ - lib/karafka/schemas/responder_usage.rb
243
295
  - lib/karafka/server.rb
244
296
  - lib/karafka/setup/config.rb
245
- - lib/karafka/setup/config_schema.rb
246
297
  - lib/karafka/setup/configurators/base.rb
247
298
  - lib/karafka/setup/configurators/celluloid.rb
248
299
  - lib/karafka/setup/configurators/sidekiq.rb
249
300
  - lib/karafka/setup/configurators/water_drop.rb
250
- - lib/karafka/setup/configurators/worker_glass.rb
251
301
  - lib/karafka/status.rb
252
302
  - lib/karafka/templates/app.rb.example
253
303
  - lib/karafka/templates/application_controller.rb.example
254
304
  - lib/karafka/templates/application_responder.rb.example
255
305
  - lib/karafka/templates/application_worker.rb.example
256
- - lib/karafka/templates/config.ru.example
257
306
  - lib/karafka/templates/sidekiq.yml.example
258
307
  - lib/karafka/version.rb
259
308
  - lib/karafka/workers/builder.rb
@@ -273,9 +322,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
273
322
  version: 2.3.0
274
323
  required_rubygems_version: !ruby/object:Gem::Requirement
275
324
  requirements:
276
- - - ">="
325
+ - - ">"
277
326
  - !ruby/object:Gem::Version
278
- version: '0'
327
+ version: 1.3.1
279
328
  requirements: []
280
329
  rubyforge_project:
281
330
  rubygems_version: 2.6.11