karafka 1.4.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +2 -0
  3. data.tar.gz.sig +0 -0
  4. data/.coditsu/ci.yml +3 -0
  5. data/.console_irbrc +11 -0
  6. data/.diffend.yml +3 -0
  7. data/.github/FUNDING.yml +3 -0
  8. data/.github/ISSUE_TEMPLATE/bug_report.md +50 -0
  9. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  10. data/.github/workflows/ci.yml +52 -0
  11. data/.gitignore +69 -0
  12. data/.rspec +1 -0
  13. data/.ruby-gemset +1 -0
  14. data/.ruby-version +1 -0
  15. data/CHANGELOG.md +566 -0
  16. data/CODE_OF_CONDUCT.md +46 -0
  17. data/CONTRIBUTING.md +41 -0
  18. data/Gemfile +14 -0
  19. data/Gemfile.lock +139 -0
  20. data/MIT-LICENCE +18 -0
  21. data/README.md +99 -0
  22. data/bin/karafka +19 -0
  23. data/certs/mensfeld.pem +25 -0
  24. data/config/errors.yml +39 -0
  25. data/docker-compose.yml +17 -0
  26. data/karafka.gemspec +43 -0
  27. data/lib/karafka.rb +72 -0
  28. data/lib/karafka/app.rb +53 -0
  29. data/lib/karafka/attributes_map.rb +62 -0
  30. data/lib/karafka/backends/inline.rb +16 -0
  31. data/lib/karafka/base_consumer.rb +57 -0
  32. data/lib/karafka/base_responder.rb +226 -0
  33. data/lib/karafka/cli.rb +54 -0
  34. data/lib/karafka/cli/base.rb +78 -0
  35. data/lib/karafka/cli/console.rb +31 -0
  36. data/lib/karafka/cli/flow.rb +48 -0
  37. data/lib/karafka/cli/info.rb +31 -0
  38. data/lib/karafka/cli/install.rb +66 -0
  39. data/lib/karafka/cli/server.rb +71 -0
  40. data/lib/karafka/code_reloader.rb +67 -0
  41. data/lib/karafka/connection/api_adapter.rb +161 -0
  42. data/lib/karafka/connection/batch_delegator.rb +55 -0
  43. data/lib/karafka/connection/builder.rb +18 -0
  44. data/lib/karafka/connection/client.rb +117 -0
  45. data/lib/karafka/connection/listener.rb +71 -0
  46. data/lib/karafka/connection/message_delegator.rb +36 -0
  47. data/lib/karafka/consumers/batch_metadata.rb +10 -0
  48. data/lib/karafka/consumers/callbacks.rb +71 -0
  49. data/lib/karafka/consumers/includer.rb +64 -0
  50. data/lib/karafka/consumers/responders.rb +24 -0
  51. data/lib/karafka/consumers/single_params.rb +15 -0
  52. data/lib/karafka/contracts.rb +10 -0
  53. data/lib/karafka/contracts/config.rb +21 -0
  54. data/lib/karafka/contracts/consumer_group.rb +206 -0
  55. data/lib/karafka/contracts/consumer_group_topic.rb +19 -0
  56. data/lib/karafka/contracts/responder_usage.rb +54 -0
  57. data/lib/karafka/contracts/server_cli_options.rb +31 -0
  58. data/lib/karafka/errors.rb +51 -0
  59. data/lib/karafka/fetcher.rb +42 -0
  60. data/lib/karafka/helpers/class_matcher.rb +88 -0
  61. data/lib/karafka/helpers/config_retriever.rb +46 -0
  62. data/lib/karafka/helpers/inflector.rb +26 -0
  63. data/lib/karafka/helpers/multi_delegator.rb +32 -0
  64. data/lib/karafka/instrumentation/logger.rb +58 -0
  65. data/lib/karafka/instrumentation/monitor.rb +70 -0
  66. data/lib/karafka/instrumentation/proctitle_listener.rb +36 -0
  67. data/lib/karafka/instrumentation/stdout_listener.rb +140 -0
  68. data/lib/karafka/params/batch_metadata.rb +26 -0
  69. data/lib/karafka/params/builders/batch_metadata.rb +30 -0
  70. data/lib/karafka/params/builders/params.rb +38 -0
  71. data/lib/karafka/params/builders/params_batch.rb +25 -0
  72. data/lib/karafka/params/metadata.rb +20 -0
  73. data/lib/karafka/params/params.rb +50 -0
  74. data/lib/karafka/params/params_batch.rb +60 -0
  75. data/lib/karafka/patches/ruby_kafka.rb +47 -0
  76. data/lib/karafka/persistence/client.rb +29 -0
  77. data/lib/karafka/persistence/consumers.rb +45 -0
  78. data/lib/karafka/persistence/topics.rb +48 -0
  79. data/lib/karafka/process.rb +60 -0
  80. data/lib/karafka/responders/builder.rb +36 -0
  81. data/lib/karafka/responders/topic.rb +55 -0
  82. data/lib/karafka/routing/builder.rb +89 -0
  83. data/lib/karafka/routing/consumer_group.rb +61 -0
  84. data/lib/karafka/routing/consumer_mapper.rb +34 -0
  85. data/lib/karafka/routing/proxy.rb +46 -0
  86. data/lib/karafka/routing/router.rb +29 -0
  87. data/lib/karafka/routing/topic.rb +62 -0
  88. data/lib/karafka/routing/topic_mapper.rb +53 -0
  89. data/lib/karafka/serialization/json/deserializer.rb +27 -0
  90. data/lib/karafka/serialization/json/serializer.rb +31 -0
  91. data/lib/karafka/server.rb +86 -0
  92. data/lib/karafka/setup/config.rb +223 -0
  93. data/lib/karafka/setup/configurators/water_drop.rb +36 -0
  94. data/lib/karafka/setup/dsl.rb +21 -0
  95. data/lib/karafka/status.rb +29 -0
  96. data/lib/karafka/templates/application_consumer.rb.erb +7 -0
  97. data/lib/karafka/templates/application_responder.rb.erb +11 -0
  98. data/lib/karafka/templates/karafka.rb.erb +92 -0
  99. data/lib/karafka/version.rb +7 -0
  100. data/log/.gitkeep +0 -0
  101. metadata +325 -0
  102. metadata.gz.sig +4 -0
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at maciej@mensfeld.pl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
@@ -0,0 +1,41 @@
1
+ # Contribute
2
+
3
+ ## Introduction
4
+
5
+ First, thank you for considering contributing to karafka! It's people like you that make the open source community such a great community! 😊
6
+
7
+ We welcome any type of contribution, not only code. You can help with:
8
+ - **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
9
+ - **Marketing**: writing blog posts, howto's, printing stickers, ...
10
+ - **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
11
+ - **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
12
+
13
+ ## Your First Contribution
14
+
15
+ Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
16
+
17
+ ## Submitting code
18
+
19
+ Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
20
+
21
+ ## Code review process
22
+
23
+ Each pull request must pass all the rspec specs and meet our quality requirements.
24
+
25
+ To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combines multiple linters and code analyzers for both code and documentation. Once you're done with your changes, submit a pull request.
26
+
27
+ Coditsu will automatically check your work against our quality standards. You can find your commit check results on the [builds page](https://app.coditsu.io/karafka/commit_builds) of Karafka organization.
28
+
29
+ [![coditsu](https://coditsu.io/assets/quality_bar.svg)](https://app.coditsu.io/karafka/commit_builds)
30
+
31
+ ## Questions
32
+
33
+ If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
34
+ You can also reach us at hello@karafka.opencollective.com.
35
+
36
+ ## Credits
37
+
38
+ ### Contributors
39
+
40
+ Thank you to all the people who have already contributed to karafka!
41
+ <a href="graphs/contributors"><img src="https://opencollective.com/karafka/contributors.svg?width=890" /></a>
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ plugin 'diffend'
6
+
7
+ gemspec
8
+
9
+ group :test do
10
+ gem 'byebug'
11
+ gem 'factory_bot'
12
+ gem 'rspec'
13
+ gem 'simplecov'
14
+ end
@@ -0,0 +1,139 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ karafka (1.4.0.rc1)
5
+ dry-configurable (~> 0.8)
6
+ dry-inflector (~> 0.1)
7
+ dry-monitor (~> 0.3)
8
+ dry-validation (~> 1.2)
9
+ envlogic (~> 1.1)
10
+ irb (~> 1.0)
11
+ rake (>= 11.3)
12
+ ruby-kafka (>= 1.0.0)
13
+ thor (>= 0.20)
14
+ waterdrop (~> 1.4.0)
15
+ zeitwerk (~> 2.1)
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ activesupport (6.0.3.2)
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ i18n (>= 0.7, < 2)
23
+ minitest (~> 5.1)
24
+ tzinfo (~> 1.1)
25
+ zeitwerk (~> 2.2, >= 2.2.2)
26
+ byebug (11.1.3)
27
+ concurrent-ruby (1.1.7)
28
+ delivery_boy (1.0.1)
29
+ king_konf (~> 0.3)
30
+ ruby-kafka (~> 1.0)
31
+ diff-lcs (1.4.4)
32
+ digest-crc (0.6.1)
33
+ rake (~> 13.0)
34
+ docile (1.3.2)
35
+ dry-configurable (0.11.6)
36
+ concurrent-ruby (~> 1.0)
37
+ dry-core (~> 0.4, >= 0.4.7)
38
+ dry-equalizer (~> 0.2)
39
+ dry-container (0.7.2)
40
+ concurrent-ruby (~> 1.0)
41
+ dry-configurable (~> 0.1, >= 0.1.3)
42
+ dry-core (0.4.9)
43
+ concurrent-ruby (~> 1.0)
44
+ dry-equalizer (0.3.0)
45
+ dry-events (0.2.0)
46
+ concurrent-ruby (~> 1.0)
47
+ dry-core (~> 0.4)
48
+ dry-equalizer (~> 0.2)
49
+ dry-inflector (0.2.0)
50
+ dry-initializer (3.0.3)
51
+ dry-logic (1.0.7)
52
+ concurrent-ruby (~> 1.0)
53
+ dry-core (~> 0.2)
54
+ dry-equalizer (~> 0.2)
55
+ dry-monitor (0.3.2)
56
+ dry-configurable (~> 0.5)
57
+ dry-core (~> 0.4)
58
+ dry-equalizer (~> 0.2)
59
+ dry-events (~> 0.2)
60
+ dry-schema (1.5.3)
61
+ concurrent-ruby (~> 1.0)
62
+ dry-configurable (~> 0.8, >= 0.8.3)
63
+ dry-core (~> 0.4)
64
+ dry-equalizer (~> 0.2)
65
+ dry-initializer (~> 3.0)
66
+ dry-logic (~> 1.0)
67
+ dry-types (~> 1.4)
68
+ dry-types (1.4.0)
69
+ concurrent-ruby (~> 1.0)
70
+ dry-container (~> 0.3)
71
+ dry-core (~> 0.4, >= 0.4.4)
72
+ dry-equalizer (~> 0.3)
73
+ dry-inflector (~> 0.1, >= 0.1.2)
74
+ dry-logic (~> 1.0, >= 1.0.2)
75
+ dry-validation (1.5.4)
76
+ concurrent-ruby (~> 1.0)
77
+ dry-container (~> 0.7, >= 0.7.1)
78
+ dry-core (~> 0.4)
79
+ dry-equalizer (~> 0.2)
80
+ dry-initializer (~> 3.0)
81
+ dry-schema (~> 1.5)
82
+ envlogic (1.1.2)
83
+ dry-inflector (~> 0.1)
84
+ factory_bot (6.1.0)
85
+ activesupport (>= 5.0.0)
86
+ i18n (1.8.5)
87
+ concurrent-ruby (~> 1.0)
88
+ io-console (0.5.6)
89
+ irb (1.2.4)
90
+ reline (>= 0.0.1)
91
+ king_konf (0.3.7)
92
+ minitest (5.14.1)
93
+ rake (13.0.1)
94
+ reline (0.1.4)
95
+ io-console (~> 0.5)
96
+ rspec (3.9.0)
97
+ rspec-core (~> 3.9.0)
98
+ rspec-expectations (~> 3.9.0)
99
+ rspec-mocks (~> 3.9.0)
100
+ rspec-core (3.9.2)
101
+ rspec-support (~> 3.9.3)
102
+ rspec-expectations (3.9.2)
103
+ diff-lcs (>= 1.2.0, < 2.0)
104
+ rspec-support (~> 3.9.0)
105
+ rspec-mocks (3.9.1)
106
+ diff-lcs (>= 1.2.0, < 2.0)
107
+ rspec-support (~> 3.9.0)
108
+ rspec-support (3.9.3)
109
+ ruby-kafka (1.2.0)
110
+ digest-crc
111
+ simplecov (0.19.0)
112
+ docile (~> 1.1)
113
+ simplecov-html (~> 0.11)
114
+ simplecov-html (0.12.2)
115
+ thor (1.0.1)
116
+ thread_safe (0.3.6)
117
+ tzinfo (1.2.7)
118
+ thread_safe (~> 0.1)
119
+ waterdrop (1.4.0)
120
+ delivery_boy (>= 0.2, < 2.x)
121
+ dry-configurable (~> 0.8)
122
+ dry-monitor (~> 0.3)
123
+ dry-validation (~> 1.2)
124
+ ruby-kafka (>= 0.7.8)
125
+ zeitwerk (~> 2.1)
126
+ zeitwerk (2.4.0)
127
+
128
+ PLATFORMS
129
+ ruby
130
+
131
+ DEPENDENCIES
132
+ byebug
133
+ factory_bot
134
+ karafka!
135
+ rspec
136
+ simplecov
137
+
138
+ BUNDLED WITH
139
+ 2.1.4
@@ -0,0 +1,18 @@
1
+ Permission is hereby granted, free of charge, to any person obtaining
2
+ a copy of this software and associated documentation files (the
3
+ "Software"), to deal in the Software without restriction, including
4
+ without limitation the rights to use, copy, modify, merge, publish,
5
+ distribute, sublicense, and/or sell copies of the Software, and to
6
+ permit persons to whom the Software is furnished to do so, subject to
7
+ the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be
10
+ included in all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,99 @@
1
+ ![karafka logo](https://raw.githubusercontent.com/karafka/misc/master/logo/karafka_logotype_transparent2.png)
2
+
3
+ [![Build Status](https://travis-ci.org/karafka/karafka.svg?branch=master)](https://travis-ci.org/karafka/karafka)
4
+
5
+ **Note**: Documentation presented here refers to **not yet** released Karafka `1.4.x`.
6
+
7
+ If you are looking for the documentation for Karafka `1.3.x`, it can be found [here](https://github.com/karafka/wiki/tree/1.3).
8
+
9
+ ## About Karafka
10
+
11
+ Framework used to simplify Apache Kafka based Ruby applications development.
12
+
13
+ Karafka allows you to capture everything that happens in your systems in large scale, providing you with a seamless and stable core for consuming and processing this data, without having to focus on things that are not your business domain.
14
+
15
+ Karafka not only handles incoming messages but also provides tools for building complex data-flow applications that receive and send messages.
16
+
17
+ ## How does it work
18
+
19
+ Karafka provides a higher-level abstraction that allows you to focus on your business logic development, instead of focusing on implementing lower level abstraction layers. It provides developers with a set of tools that are dedicated for building multi-topic applications similar to how Rails applications are being built.
20
+
21
+ ### Some things you might wonder about:
22
+
23
+ - You can integrate Karafka with **any** Ruby-based application.
24
+ - Karafka does **not** require Sidekiq or any other third party software (apart from Kafka itself).
25
+ - Karafka works with Ruby on Rails but it is a **standalone** framework that can work without it.
26
+ - Karafka has a **minimal** set of dependencies, so adding it won't be a huge burden for your already existing applications.
27
+ - Karafka processes can be executed for a **given subset** of consumer groups and/or topics, so you can fine tune it depending on your business logic.
28
+
29
+ Karafka based applications can be easily deployed to any type of infrastructure, including those based on:
30
+
31
+ * Heroku
32
+ * Capistrano
33
+ * Docker
34
+ * Terraform
35
+
36
+ ## Support
37
+
38
+ Karafka has a [Wiki pages](https://github.com/karafka/karafka/wiki) for almost everything and a pretty decent [FAQ](https://github.com/karafka/karafka/wiki/FAQ). It covers the whole installation, setup, and deployment along with other useful details on how to run Karafka.
39
+
40
+ If you have any questions about using Karafka, feel free to join our [Gitter](https://gitter.im/karafka/karafka) chat channel.
41
+
42
+ ## Getting started
43
+
44
+ If you're completely new to the subject, you can start with our "Kafka on Rails" articles series, that will get you up and running with the terminology and basic ideas behind using Kafka:
45
+
46
+ - [Kafka on Rails: Using Kafka with Ruby on Rails – Part 1 – Kafka basics and its advantages](https://mensfeld.pl/2017/11/kafka-on-rails-using-kafka-with-ruby-on-rails-part-1-kafka-basics-and-its-advantages/)
47
+ - [Kafka on Rails: Using Kafka with Ruby on Rails – Part 2 – Getting started with Ruby and Kafka](https://mensfeld.pl/2018/01/kafka-on-rails-using-kafka-with-ruby-on-rails-part-2-getting-started-with-ruby-and-kafka/)
48
+
49
+ If you want to get started with Kafka and Karafka as fast as possible, then the best idea is to just clone our example repository:
50
+
51
+ ```bash
52
+ git clone https://github.com/karafka/example-app ./example_app
53
+ ```
54
+
55
+ then, just bundle install all the dependencies:
56
+
57
+ ```bash
58
+ cd ./example_app
59
+ bundle install
60
+ ```
61
+
62
+ and follow the instructions from the [example app Wiki](https://github.com/karafka/example-app/blob/master/README.md).
63
+
64
+ **Note**: you need to ensure, that you have Kafka up and running and you need to configure Kafka seed_brokers in the ```karafka.rb``` file.
65
+
66
+ If you need more details and know how on how to start Karafka with a clean installation, read the [Getting started page](https://github.com/karafka/karafka/wiki/Getting-started) section of our Wiki.
67
+
68
+ ## Notice
69
+
70
+ Karafka framework and Karafka team are __not__ related to Kafka streaming service called CloudKarafka in any matter. We don't recommend nor discourage usage of their platform.
71
+
72
+ ## References
73
+
74
+ * [Karafka framework](https://github.com/karafka/karafka)
75
+ * [Karafka Travis CI](https://travis-ci.org/karafka/karafka)
76
+ * [Karafka Coditsu](https://app.coditsu.io/karafka/repositories/karafka)
77
+
78
+ ## Note on contributions
79
+
80
+ First, thank you for considering contributing to Karafka! It's people like you that make the open source community such a great community!
81
+
82
+ Each pull request must pass all the RSpec specs and meet our quality requirements.
83
+
84
+ To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combines multiple linters and code analyzers for both code and documentation. Once you're done with your changes, submit a pull request.
85
+
86
+ Coditsu will automatically check your work against our quality standards. You can find your commit check results on the [builds page](https://app.coditsu.io/karafka/commit_builds) of Karafka organization.
87
+
88
+ [![coditsu](https://coditsu.io/assets/quality_bar.svg)](https://app.coditsu.io/karafka/commit_builds)
89
+
90
+ ## Contributors
91
+
92
+ This project exists thanks to all the people who contribute.
93
+ <a href="https://github.com/karafka/karafka/graphs/contributors"><img src="https://opencollective.com/karafka/contributors.svg?width=890" /></a>
94
+
95
+ ## Sponsors
96
+
97
+ We are looking for sustainable sponsorship. If your company is relying on Karafka framework or simply want to see Karafka evolve faster to meet your requirements, please consider backing the project.
98
+
99
+ Please contact [Maciej Mensfeld](mailto:maciej@mensfeld.pl) directly for more details.
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'karafka'
4
+
5
+ # If there is a boot file, we need to require it as we expect it to contain
6
+ # Karafka app setup, routes, etc
7
+ if File.exist?(Karafka.boot_file)
8
+ require Karafka.boot_file.to_s
9
+ else
10
+ # However when it is unavailable, we still want to be able to run help command
11
+ # and install command as they don't require configured app itself to run
12
+ raise(
13
+ Karafka::Errors::MissingBootFileError,
14
+ Karafka.boot_file
15
+ ) unless %w[-h install].include?(ARGV[0])
16
+ end
17
+
18
+ Karafka::Cli.prepare
19
+ Karafka::Cli.start
@@ -0,0 +1,25 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhtYWNp
3
+ ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMjAwODExMDkxNTM3WhcNMjEwODExMDkx
4
+ NTM3WjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
5
+ CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDCpXsCgmINb6lHBXXBdyrgsBPSxC4/
6
+ 2H+weJ6L9CruTiv2+2/ZkQGtnLcDgrD14rdLIHK7t0o3EKYlDT5GhD/XUVhI15JE
7
+ N7IqnPUgexe1fbZArwQ51afxz2AmPQN2BkB2oeQHXxnSWUGMhvcEZpfbxCCJH26w
8
+ hS0Ccsma8yxA6hSlGVhFVDuCr7c2L1di6cK2CtIDpfDaWqnVNJEwBYHIxrCoWK5g
9
+ sIGekVt/admS9gRhIMaIBg+Mshth5/DEyWO2QjteTodItlxfTctrfmiAl8X8T5JP
10
+ VXeLp5SSOJ5JXE80nShMJp3RFnGw5fqjX/ffjtISYh78/By4xF3a25HdWH9+qO2Z
11
+ tx0wSGc9/4gqNM0APQnjN/4YXrGZ4IeSjtE+OrrX07l0TiyikzSLFOkZCAp8oBJi
12
+ Fhlosz8xQDJf7mhNxOaZziqASzp/hJTU/tuDKl5+ql2icnMv5iV/i6SlmvU29QNg
13
+ LCV71pUv0pWzN+OZbHZKWepGhEQ3cG9MwvkCAwEAAaN3MHUwCQYDVR0TBAIwADAL
14
+ BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFImGed2AXS070ohfRidiCEhXEUN+MB0GA1Ud
15
+ EQQWMBSBEm1hY2llakBtZW5zZmVsZC5wbDAdBgNVHRIEFjAUgRJtYWNpZWpAbWVu
16
+ c2ZlbGQucGwwDQYJKoZIhvcNAQELBQADggGBAKiHpwoENVrMi94V1zD4o8/6G3AU
17
+ gWz4udkPYHTZLUy3dLznc/sNjdkJFWT3E6NKYq7c60EpJ0m0vAEg5+F5pmNOsvD3
18
+ 2pXLj9kisEeYhR516HwXAvtngboUcb75skqvBCU++4Pu7BRAPjO1/ihLSBexbwSS
19
+ fF+J5OWNuyHHCQp+kGPLtXJe2yUYyvSWDj3I2//Vk0VhNOIlaCS1+5/P3ZJThOtm
20
+ zJUBI7h3HgovwRpcnmk2mXTmU4Zx/bCzX8EA6VY0khEvnmiq7S6eBF0H9qH8KyQ6
21
+ EkVLpvmUDFcf/uNaBQdazEMB5jYtwoA8gQlANETNGPi51KlkukhKgaIEDMkBDJOx
22
+ 65N7DzmkcyY0/GwjIVIxmRhcrCt1YeCUElmfFx0iida1/YRm6sB2AXqScc1+ECRi
23
+ 2DND//YJUikn1zwbz1kT70XmHd97B4Eytpln7K+M1u2g1pHVEPW4owD/ammXNpUy
24
+ nt70FcDD4yxJQ+0YNiHd0N8IcVBM1TMIVctMNQ==
25
+ -----END CERTIFICATE-----
@@ -0,0 +1,39 @@
1
+ en:
2
+ dry_validation:
3
+ errors:
4
+ invalid_broker_schema: >
5
+ has an invalid format
6
+ Expected schema, host and port number
7
+ Example: kafka://127.0.0.1:9092 or kafka+ssl://127.0.0.1:9092
8
+ invalid_certificate: >
9
+ is not a valid certificate
10
+ invalid_certificate_from_path: >
11
+ is not a valid certificate
12
+ invalid_private_key: >
13
+ is not a valid private key
14
+ max_timeout_size_for_exponential: >
15
+ pause_timeout cannot be more than pause_max_timeout
16
+ max_wait_time_limit:
17
+ max_wait_time cannot be more than socket_timeout
18
+ topics_names_not_unique: >
19
+ all topic names within a single consumer group must be unique
20
+ ssl_client_cert_with_ssl_client_cert_key: >
21
+ Both ssl_client_cert and ssl_client_cert_key need to be provided
22
+ ssl_client_cert_key_with_ssl_client_cert: >
23
+ Both ssl_client_cert_key and ssl_client_cert need to be provided
24
+ ssl_client_cert_chain_with_ssl_client_cert: >
25
+ Both ssl_client_cert_chain and ssl_client_cert need to be provided
26
+ ssl_client_cert_chain_with_ssl_client_cert_key: >
27
+ Both ssl_client_cert_chain and ssl_client_cert_key need to be provided
28
+ ssl_client_cert_key_password_with_ssl_client_cert_key: >
29
+ Both ssl_client_cert_key_password and ssl_client_cert_key need to be provided
30
+ does_not_respond_to_token: >
31
+ needs to respond to a #token method
32
+ required_usage_count: >
33
+ Given topic must be used at least once
34
+ pid_already_exists: >
35
+ Pidfile already exists
36
+ consumer_groups_inclusion: >
37
+ Unknown consumer group
38
+ does_not_exist:
39
+ Given file does not exist or cannot be read