phobos_temp_fork 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.dockerignore +13 -0
- data/.env +1 -0
- data/.gitignore +16 -0
- data/.rspec +3 -0
- data/.rubocop.yml +26 -0
- data/.rubocop_common.yml +29 -0
- data/.rubocop_todo.yml +7 -0
- data/.rubosync.yml +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +37 -0
- data/CHANGELOG.md +170 -0
- data/Dockerfile +14 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +176 -0
- data/README.md +699 -0
- data/Rakefile +8 -0
- data/bin/console +19 -0
- data/bin/phobos +10 -0
- data/bin/setup +8 -0
- data/config/phobos.yml.example +137 -0
- data/docker-compose.yml +28 -0
- data/examples/handler_saving_events_database.rb +51 -0
- data/examples/handler_using_async_producer.rb +17 -0
- data/examples/publishing_messages_without_consumer.rb +82 -0
- data/lib/phobos/actions/process_batch.rb +35 -0
- data/lib/phobos/actions/process_batch_inline.rb +61 -0
- data/lib/phobos/actions/process_message.rb +49 -0
- data/lib/phobos/batch_handler.rb +23 -0
- data/lib/phobos/batch_message.rb +21 -0
- data/lib/phobos/cli.rb +69 -0
- data/lib/phobos/cli/runner.rb +48 -0
- data/lib/phobos/cli/start.rb +71 -0
- data/lib/phobos/constants.rb +33 -0
- data/lib/phobos/deep_struct.rb +39 -0
- data/lib/phobos/echo_handler.rb +11 -0
- data/lib/phobos/errors.rb +6 -0
- data/lib/phobos/executor.rb +103 -0
- data/lib/phobos/handler.rb +23 -0
- data/lib/phobos/instrumentation.rb +25 -0
- data/lib/phobos/listener.rb +192 -0
- data/lib/phobos/log.rb +23 -0
- data/lib/phobos/processor.rb +67 -0
- data/lib/phobos/producer.rb +171 -0
- data/lib/phobos/test.rb +3 -0
- data/lib/phobos/test/helper.rb +29 -0
- data/lib/phobos/version.rb +5 -0
- data/lib/phobos_temp_fork.rb +175 -0
- data/logo.png +0 -0
- data/phobos.gemspec +69 -0
- data/phobos_boot.rb +31 -0
- data/utils/create-topic.sh +13 -0
- metadata +308 -0
data/lib/phobos/test.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Phobos
|
4
|
+
module Test
|
5
|
+
module Helper
|
6
|
+
TOPIC = 'test-topic'
|
7
|
+
GROUP = 'test-group'
|
8
|
+
|
9
|
+
def process_message(handler:, payload:, metadata: {}, force_encoding: nil)
|
10
|
+
listener = Phobos::Listener.new(
|
11
|
+
handler: handler,
|
12
|
+
group_id: GROUP,
|
13
|
+
topic: TOPIC, force_encoding: force_encoding
|
14
|
+
)
|
15
|
+
|
16
|
+
message = Kafka::FetchedMessage.new(
|
17
|
+
message: Kafka::Protocol::Message.new(value: payload, key: nil, offset: 13),
|
18
|
+
topic: TOPIC, partition: 0
|
19
|
+
)
|
20
|
+
|
21
|
+
Phobos::Actions::ProcessMessage.new(
|
22
|
+
listener: listener,
|
23
|
+
message: message,
|
24
|
+
listener_metadata: metadata
|
25
|
+
).execute
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,175 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ostruct'
|
4
|
+
require 'securerandom'
|
5
|
+
require 'yaml'
|
6
|
+
|
7
|
+
require 'active_support/core_ext/hash/keys'
|
8
|
+
require 'active_support/core_ext/string/inflections'
|
9
|
+
require 'active_support/notifications'
|
10
|
+
require 'concurrent'
|
11
|
+
require 'exponential_backoff'
|
12
|
+
require 'kafka'
|
13
|
+
require 'logging'
|
14
|
+
require 'erb'
|
15
|
+
|
16
|
+
require 'phobos/deep_struct'
|
17
|
+
require 'phobos/version'
|
18
|
+
require 'phobos/constants'
|
19
|
+
require 'phobos/log'
|
20
|
+
require 'phobos/instrumentation'
|
21
|
+
require 'phobos/errors'
|
22
|
+
require 'phobos/listener'
|
23
|
+
require 'phobos/actions/process_batch'
|
24
|
+
require 'phobos/actions/process_message'
|
25
|
+
require 'phobos/actions/process_batch_inline'
|
26
|
+
require 'phobos/producer'
|
27
|
+
require 'phobos/handler'
|
28
|
+
require 'phobos/batch_handler'
|
29
|
+
require 'phobos/echo_handler'
|
30
|
+
require 'phobos/executor'
|
31
|
+
|
32
|
+
Thread.abort_on_exception = true
|
33
|
+
|
34
|
+
Logging.init :debug, :info, :warn, :error, :fatal
|
35
|
+
|
36
|
+
# Monkey patch to fix this issue: https://github.com/zendesk/ruby-kafka/pull/732
|
37
|
+
module Logging
|
38
|
+
# :nodoc:
|
39
|
+
class Logger
|
40
|
+
# :nodoc:
|
41
|
+
def formatter=(*args); end
|
42
|
+
|
43
|
+
# :nodoc:
|
44
|
+
def push_tags(*args); end
|
45
|
+
|
46
|
+
# :nodoc:
|
47
|
+
def pop_tags(*args); end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
module Phobos
|
52
|
+
class << self
|
53
|
+
attr_reader :config, :logger
|
54
|
+
attr_accessor :silence_log
|
55
|
+
|
56
|
+
def configure(configuration)
|
57
|
+
@config = fetch_configuration(configuration)
|
58
|
+
@config.class.send(:define_method, :producer_hash) do
|
59
|
+
Phobos.config.producer&.to_hash&.except(:kafka)
|
60
|
+
end
|
61
|
+
@config.class.send(:define_method, :consumer_hash) do
|
62
|
+
Phobos.config.consumer&.to_hash&.except(:kafka)
|
63
|
+
end
|
64
|
+
@config.listeners ||= []
|
65
|
+
configure_logger
|
66
|
+
end
|
67
|
+
|
68
|
+
def add_listeners(configuration)
|
69
|
+
listeners_config = fetch_configuration(configuration)
|
70
|
+
@config.listeners += listeners_config.listeners
|
71
|
+
end
|
72
|
+
|
73
|
+
def create_kafka_client(config_key = nil)
|
74
|
+
kafka_config = config.kafka.to_hash.merge(logger: @ruby_kafka_logger)
|
75
|
+
|
76
|
+
if config_key
|
77
|
+
kafka_config = kafka_config.merge(**config.send(config_key)&.kafka&.to_hash || {})
|
78
|
+
end
|
79
|
+
|
80
|
+
Kafka.new(**kafka_config)
|
81
|
+
end
|
82
|
+
|
83
|
+
def create_exponential_backoff(backoff_config = nil)
|
84
|
+
backoff_config ||= Phobos.config.backoff.to_hash
|
85
|
+
min = backoff_config[:min_ms] / 1000.0
|
86
|
+
max = backoff_config[:max_ms] / 1000.0
|
87
|
+
ExponentialBackoff.new(min, max).tap { |backoff| backoff.randomize_factor = rand }
|
88
|
+
end
|
89
|
+
|
90
|
+
def deprecate(message)
|
91
|
+
location = caller.find { |line| line !~ %r{/phobos/} }
|
92
|
+
warn "DEPRECATION WARNING: #{message}: #{location}"
|
93
|
+
end
|
94
|
+
|
95
|
+
# :nodoc:
|
96
|
+
def configure_logger
|
97
|
+
Logging.backtrace(true)
|
98
|
+
Logging.logger.root.level = silence_log ? :fatal : config.logger.level
|
99
|
+
|
100
|
+
configure_ruby_kafka_logger
|
101
|
+
configure_phobos_logger
|
102
|
+
|
103
|
+
logger.info do
|
104
|
+
Hash(message: 'Phobos configured', env: ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'N/A')
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
private
|
109
|
+
|
110
|
+
def fetch_configuration(configuration)
|
111
|
+
DeepStruct.new(read_configuration(configuration))
|
112
|
+
end
|
113
|
+
|
114
|
+
def read_configuration(configuration)
|
115
|
+
return configuration.to_h if configuration.respond_to?(:to_h)
|
116
|
+
|
117
|
+
YAML.safe_load(
|
118
|
+
ERB.new(
|
119
|
+
File.read(File.expand_path(configuration))
|
120
|
+
).result,
|
121
|
+
[Symbol],
|
122
|
+
[],
|
123
|
+
true
|
124
|
+
)
|
125
|
+
end
|
126
|
+
|
127
|
+
def configure_phobos_logger
|
128
|
+
if config.custom_logger
|
129
|
+
@logger = config.custom_logger
|
130
|
+
else
|
131
|
+
@logger = Logging.logger[self]
|
132
|
+
@logger.appenders = logger_appenders
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def configure_ruby_kafka_logger
|
137
|
+
if config.custom_kafka_logger
|
138
|
+
@ruby_kafka_logger = config.custom_kafka_logger
|
139
|
+
elsif config.logger.ruby_kafka
|
140
|
+
@ruby_kafka_logger = Logging.logger['RubyKafka']
|
141
|
+
@ruby_kafka_logger.appenders = logger_appenders
|
142
|
+
@ruby_kafka_logger.level = silence_log ? :fatal : config.logger.ruby_kafka.level
|
143
|
+
else
|
144
|
+
@ruby_kafka_logger = nil
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
def logger_appenders
|
149
|
+
appenders = [Logging.appenders.stdout(layout: stdout_layout)]
|
150
|
+
|
151
|
+
if log_file
|
152
|
+
FileUtils.mkdir_p(File.dirname(log_file))
|
153
|
+
appenders << Logging.appenders.file(log_file, layout: json_layout)
|
154
|
+
end
|
155
|
+
|
156
|
+
appenders
|
157
|
+
end
|
158
|
+
|
159
|
+
def log_file
|
160
|
+
config.logger.file
|
161
|
+
end
|
162
|
+
|
163
|
+
def json_layout
|
164
|
+
Logging.layouts.json(date_pattern: Constants::LOG_DATE_PATTERN)
|
165
|
+
end
|
166
|
+
|
167
|
+
def stdout_layout
|
168
|
+
if config.logger.stdout_json == true
|
169
|
+
json_layout
|
170
|
+
else
|
171
|
+
Logging.layouts.pattern(date_pattern: Constants::LOG_DATE_PATTERN)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
data/logo.png
ADDED
Binary file
|
data/phobos.gemspec
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'phobos/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'phobos_temp_fork'
|
9
|
+
spec.version = Phobos::VERSION
|
10
|
+
spec.authors = [
|
11
|
+
'Túlio Ornelas',
|
12
|
+
'Mathias Klippinge',
|
13
|
+
'Sergey Evstifeev',
|
14
|
+
'Thiago R. Colucci',
|
15
|
+
'Martin Svalin',
|
16
|
+
'Francisco Juan',
|
17
|
+
'Tommy Gustafsson',
|
18
|
+
'Daniel Orner'
|
19
|
+
]
|
20
|
+
spec.email = [
|
21
|
+
'ornelas.tulio@gmail.com',
|
22
|
+
'mathias.klippinge@gmail.com',
|
23
|
+
'sergey.evstifeev@gmail.com',
|
24
|
+
'ticolucci@gmail.com',
|
25
|
+
'martin@lite.nu',
|
26
|
+
'francisco.juan@gmail.com',
|
27
|
+
'tommydgustafsson@gmail.com',
|
28
|
+
'dmorner@gmail.com'
|
29
|
+
]
|
30
|
+
|
31
|
+
spec.summary = 'Simplifying Kafka for ruby apps'
|
32
|
+
spec.description = 'Phobos is a microframework and library for kafka based applications, '\
|
33
|
+
'it wraps common behaviors needed by consumers/producers in an easy an convenient API. '\
|
34
|
+
'It uses ruby-kafka as its kafka client and core component.'
|
35
|
+
spec.homepage = 'https://github.com/klarna/phobos'
|
36
|
+
spec.license = 'Apache License Version 2.0'
|
37
|
+
|
38
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
39
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
40
|
+
unless spec.respond_to?(:metadata)
|
41
|
+
raise('RubyGems 2.0 or newer is required to protect against public gem pushes.')
|
42
|
+
end
|
43
|
+
|
44
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
45
|
+
|
46
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
47
|
+
f.match(%r{^(test|spec|features)/})
|
48
|
+
end
|
49
|
+
spec.bindir = 'bin'
|
50
|
+
spec.executables = spec.files.grep(%r{^bin/phobos}) { |f| File.basename(f) }
|
51
|
+
spec.require_paths = ['lib']
|
52
|
+
spec.required_ruby_version = '>= 2.3'
|
53
|
+
|
54
|
+
spec.add_development_dependency 'bundler'
|
55
|
+
spec.add_development_dependency 'pry-byebug'
|
56
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
57
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
58
|
+
spec.add_development_dependency 'rubocop', '0.62.0'
|
59
|
+
spec.add_development_dependency 'rubocop_rules'
|
60
|
+
spec.add_development_dependency 'simplecov'
|
61
|
+
spec.add_development_dependency 'timecop'
|
62
|
+
|
63
|
+
spec.add_dependency 'activesupport', '>= 3.0.0'
|
64
|
+
spec.add_dependency 'concurrent-ruby', '>= 1.0.2'
|
65
|
+
spec.add_dependency 'concurrent-ruby-ext', '>= 1.0.2'
|
66
|
+
spec.add_dependency 'exponential-backoff'
|
67
|
+
spec.add_dependency 'logging'
|
68
|
+
spec.add_dependency 'thor'
|
69
|
+
end
|
data/phobos_boot.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
puts 'hello'
|
2
|
+
|
3
|
+
class MyHandler1
|
4
|
+
include Phobos::Handler
|
5
|
+
|
6
|
+
def consume(payload, metadata)
|
7
|
+
puts '$$$$$$ HANDLER1 $$$$$$$$$'
|
8
|
+
puts "#{Thread.current.object_id}"
|
9
|
+
puts "#{metadata}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class MyHandler2
|
14
|
+
include Phobos::Handler
|
15
|
+
|
16
|
+
def consume(payload, metadata)
|
17
|
+
puts '$$$$$$ HANDLER2 $$$$$$$$$'
|
18
|
+
puts "#{Thread.current.object_id}"
|
19
|
+
puts "#{metadata}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class MyHandler3
|
24
|
+
include Phobos::Handler
|
25
|
+
|
26
|
+
def consume(payload, metadata)
|
27
|
+
puts '$$$$$$ HANDLER3 $$$$$$$$$'
|
28
|
+
puts "#{Thread.current.object_id}"
|
29
|
+
puts "#{metadata}"
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
set -eu
|
3
|
+
|
4
|
+
TOPIC=${TOPIC:='test'}
|
5
|
+
PARTITIONS=${PARTITIONS:=2}
|
6
|
+
|
7
|
+
echo "creating topic ${TOPIC}, partitions ${PARTITIONS}"
|
8
|
+
docker-compose run --rm -e PARTITIONS=$PARTITIONS -e TOPIC=$TOPIC kafka kafka-topics.sh --create \
|
9
|
+
--topic $TOPIC \
|
10
|
+
--replication-factor 1 \
|
11
|
+
--partitions $PARTITIONS \
|
12
|
+
--zookeeper zookeeper:2181 \
|
13
|
+
2>/dev/null
|
metadata
ADDED
@@ -0,0 +1,308 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: phobos_temp_fork
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Túlio Ornelas
|
8
|
+
- Mathias Klippinge
|
9
|
+
- Sergey Evstifeev
|
10
|
+
- Thiago R. Colucci
|
11
|
+
- Martin Svalin
|
12
|
+
- Francisco Juan
|
13
|
+
- Tommy Gustafsson
|
14
|
+
- Daniel Orner
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bundler
|
22
|
+
requirement: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
type: :development
|
28
|
+
prerelease: false
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: pry-byebug
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
type: :development
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rake
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '12.3'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '12.3'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rubocop
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.62.0
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.62.0
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: rubocop_rules
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
type: :development
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: simplecov
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: timecop
|
120
|
+
requirement: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
type: :development
|
126
|
+
prerelease: false
|
127
|
+
version_requirements: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
name: activesupport
|
134
|
+
requirement: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 3.0.0
|
139
|
+
type: :runtime
|
140
|
+
prerelease: false
|
141
|
+
version_requirements: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 3.0.0
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: concurrent-ruby
|
148
|
+
requirement: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 1.0.2
|
153
|
+
type: :runtime
|
154
|
+
prerelease: false
|
155
|
+
version_requirements: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.0.2
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: concurrent-ruby-ext
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.0.2
|
167
|
+
type: :runtime
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 1.0.2
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: exponential-backoff
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
type: :runtime
|
182
|
+
prerelease: false
|
183
|
+
version_requirements: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
- !ruby/object:Gem::Dependency
|
189
|
+
name: logging
|
190
|
+
requirement: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
type: :runtime
|
196
|
+
prerelease: false
|
197
|
+
version_requirements: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
- !ruby/object:Gem::Dependency
|
203
|
+
name: thor
|
204
|
+
requirement: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
type: :runtime
|
210
|
+
prerelease: false
|
211
|
+
version_requirements: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
description: Phobos is a microframework and library for kafka based applications,
|
217
|
+
it wraps common behaviors needed by consumers/producers in an easy an convenient
|
218
|
+
API. It uses ruby-kafka as its kafka client and core component.
|
219
|
+
email:
|
220
|
+
- ornelas.tulio@gmail.com
|
221
|
+
- mathias.klippinge@gmail.com
|
222
|
+
- sergey.evstifeev@gmail.com
|
223
|
+
- ticolucci@gmail.com
|
224
|
+
- martin@lite.nu
|
225
|
+
- francisco.juan@gmail.com
|
226
|
+
- tommydgustafsson@gmail.com
|
227
|
+
- dmorner@gmail.com
|
228
|
+
executables:
|
229
|
+
- phobos
|
230
|
+
extensions: []
|
231
|
+
extra_rdoc_files: []
|
232
|
+
files:
|
233
|
+
- ".dockerignore"
|
234
|
+
- ".env"
|
235
|
+
- ".gitignore"
|
236
|
+
- ".rspec"
|
237
|
+
- ".rubocop.yml"
|
238
|
+
- ".rubocop_common.yml"
|
239
|
+
- ".rubocop_todo.yml"
|
240
|
+
- ".rubosync.yml"
|
241
|
+
- ".ruby-version"
|
242
|
+
- ".travis.yml"
|
243
|
+
- CHANGELOG.md
|
244
|
+
- Dockerfile
|
245
|
+
- Gemfile
|
246
|
+
- LICENSE.txt
|
247
|
+
- README.md
|
248
|
+
- Rakefile
|
249
|
+
- bin/console
|
250
|
+
- bin/phobos
|
251
|
+
- bin/setup
|
252
|
+
- config/phobos.yml.example
|
253
|
+
- docker-compose.yml
|
254
|
+
- examples/handler_saving_events_database.rb
|
255
|
+
- examples/handler_using_async_producer.rb
|
256
|
+
- examples/publishing_messages_without_consumer.rb
|
257
|
+
- lib/phobos/actions/process_batch.rb
|
258
|
+
- lib/phobos/actions/process_batch_inline.rb
|
259
|
+
- lib/phobos/actions/process_message.rb
|
260
|
+
- lib/phobos/batch_handler.rb
|
261
|
+
- lib/phobos/batch_message.rb
|
262
|
+
- lib/phobos/cli.rb
|
263
|
+
- lib/phobos/cli/runner.rb
|
264
|
+
- lib/phobos/cli/start.rb
|
265
|
+
- lib/phobos/constants.rb
|
266
|
+
- lib/phobos/deep_struct.rb
|
267
|
+
- lib/phobos/echo_handler.rb
|
268
|
+
- lib/phobos/errors.rb
|
269
|
+
- lib/phobos/executor.rb
|
270
|
+
- lib/phobos/handler.rb
|
271
|
+
- lib/phobos/instrumentation.rb
|
272
|
+
- lib/phobos/listener.rb
|
273
|
+
- lib/phobos/log.rb
|
274
|
+
- lib/phobos/processor.rb
|
275
|
+
- lib/phobos/producer.rb
|
276
|
+
- lib/phobos/test.rb
|
277
|
+
- lib/phobos/test/helper.rb
|
278
|
+
- lib/phobos/version.rb
|
279
|
+
- lib/phobos_temp_fork.rb
|
280
|
+
- logo.png
|
281
|
+
- phobos.gemspec
|
282
|
+
- phobos_boot.rb
|
283
|
+
- utils/create-topic.sh
|
284
|
+
homepage: https://github.com/klarna/phobos
|
285
|
+
licenses:
|
286
|
+
- Apache License Version 2.0
|
287
|
+
metadata:
|
288
|
+
allowed_push_host: https://rubygems.org
|
289
|
+
post_install_message:
|
290
|
+
rdoc_options: []
|
291
|
+
require_paths:
|
292
|
+
- lib
|
293
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
294
|
+
requirements:
|
295
|
+
- - ">="
|
296
|
+
- !ruby/object:Gem::Version
|
297
|
+
version: '2.3'
|
298
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
|
+
requirements:
|
300
|
+
- - ">="
|
301
|
+
- !ruby/object:Gem::Version
|
302
|
+
version: '0'
|
303
|
+
requirements: []
|
304
|
+
rubygems_version: 3.2.3
|
305
|
+
signing_key:
|
306
|
+
specification_version: 4
|
307
|
+
summary: Simplifying Kafka for ruby apps
|
308
|
+
test_files: []
|