karafka 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +1 -0
  4. data/.coditsu/ci.yml +3 -0
  5. data/.console_irbrc +11 -0
  6. data/.github/FUNDING.yml +3 -0
  7. data/.github/ISSUE_TEMPLATE/bug_report.md +50 -0
  8. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  9. data/.gitignore +69 -0
  10. data/.rspec +1 -0
  11. data/.ruby-gemset +1 -0
  12. data/.ruby-version +1 -0
  13. data/.travis.yml +36 -0
  14. data/CHANGELOG.md +544 -0
  15. data/CODE_OF_CONDUCT.md +46 -0
  16. data/CONTRIBUTING.md +41 -0
  17. data/Gemfile +12 -0
  18. data/Gemfile.lock +140 -0
  19. data/MIT-LICENCE +18 -0
  20. data/README.md +101 -0
  21. data/bin/karafka +19 -0
  22. data/certs/mensfeld.pem +25 -0
  23. data/config/errors.yml +39 -0
  24. data/karafka.gemspec +44 -0
  25. data/lib/karafka.rb +72 -0
  26. data/lib/karafka/app.rb +53 -0
  27. data/lib/karafka/attributes_map.rb +62 -0
  28. data/lib/karafka/backends/inline.rb +16 -0
  29. data/lib/karafka/base_consumer.rb +57 -0
  30. data/lib/karafka/base_responder.rb +226 -0
  31. data/lib/karafka/cli.rb +54 -0
  32. data/lib/karafka/cli/base.rb +78 -0
  33. data/lib/karafka/cli/console.rb +31 -0
  34. data/lib/karafka/cli/flow.rb +48 -0
  35. data/lib/karafka/cli/info.rb +31 -0
  36. data/lib/karafka/cli/install.rb +66 -0
  37. data/lib/karafka/cli/server.rb +71 -0
  38. data/lib/karafka/code_reloader.rb +67 -0
  39. data/lib/karafka/connection/api_adapter.rb +159 -0
  40. data/lib/karafka/connection/batch_delegator.rb +51 -0
  41. data/lib/karafka/connection/builder.rb +18 -0
  42. data/lib/karafka/connection/client.rb +117 -0
  43. data/lib/karafka/connection/listener.rb +71 -0
  44. data/lib/karafka/connection/message_delegator.rb +36 -0
  45. data/lib/karafka/consumers/callbacks.rb +71 -0
  46. data/lib/karafka/consumers/includer.rb +63 -0
  47. data/lib/karafka/consumers/metadata.rb +10 -0
  48. data/lib/karafka/consumers/responders.rb +24 -0
  49. data/lib/karafka/consumers/single_params.rb +15 -0
  50. data/lib/karafka/contracts.rb +10 -0
  51. data/lib/karafka/contracts/config.rb +21 -0
  52. data/lib/karafka/contracts/consumer_group.rb +206 -0
  53. data/lib/karafka/contracts/consumer_group_topic.rb +19 -0
  54. data/lib/karafka/contracts/responder_usage.rb +54 -0
  55. data/lib/karafka/contracts/server_cli_options.rb +31 -0
  56. data/lib/karafka/errors.rb +51 -0
  57. data/lib/karafka/fetcher.rb +42 -0
  58. data/lib/karafka/helpers/class_matcher.rb +88 -0
  59. data/lib/karafka/helpers/config_retriever.rb +46 -0
  60. data/lib/karafka/helpers/inflector.rb +26 -0
  61. data/lib/karafka/helpers/multi_delegator.rb +32 -0
  62. data/lib/karafka/instrumentation/logger.rb +58 -0
  63. data/lib/karafka/instrumentation/monitor.rb +70 -0
  64. data/lib/karafka/instrumentation/proctitle_listener.rb +36 -0
  65. data/lib/karafka/instrumentation/stdout_listener.rb +138 -0
  66. data/lib/karafka/params/builders/metadata.rb +33 -0
  67. data/lib/karafka/params/builders/params.rb +36 -0
  68. data/lib/karafka/params/builders/params_batch.rb +25 -0
  69. data/lib/karafka/params/metadata.rb +35 -0
  70. data/lib/karafka/params/params.rb +68 -0
  71. data/lib/karafka/params/params_batch.rb +61 -0
  72. data/lib/karafka/patches/ruby_kafka.rb +47 -0
  73. data/lib/karafka/persistence/client.rb +29 -0
  74. data/lib/karafka/persistence/consumers.rb +45 -0
  75. data/lib/karafka/persistence/topics.rb +48 -0
  76. data/lib/karafka/process.rb +60 -0
  77. data/lib/karafka/responders/builder.rb +36 -0
  78. data/lib/karafka/responders/topic.rb +55 -0
  79. data/lib/karafka/routing/builder.rb +89 -0
  80. data/lib/karafka/routing/consumer_group.rb +61 -0
  81. data/lib/karafka/routing/consumer_mapper.rb +34 -0
  82. data/lib/karafka/routing/proxy.rb +46 -0
  83. data/lib/karafka/routing/router.rb +29 -0
  84. data/lib/karafka/routing/topic.rb +62 -0
  85. data/lib/karafka/routing/topic_mapper.rb +53 -0
  86. data/lib/karafka/serialization/json/deserializer.rb +27 -0
  87. data/lib/karafka/serialization/json/serializer.rb +31 -0
  88. data/lib/karafka/server.rb +86 -0
  89. data/lib/karafka/setup/config.rb +221 -0
  90. data/lib/karafka/setup/configurators/water_drop.rb +36 -0
  91. data/lib/karafka/setup/dsl.rb +21 -0
  92. data/lib/karafka/status.rb +29 -0
  93. data/lib/karafka/templates/application_consumer.rb.erb +7 -0
  94. data/lib/karafka/templates/application_responder.rb.erb +11 -0
  95. data/lib/karafka/templates/karafka.rb.erb +92 -0
  96. data/lib/karafka/version.rb +7 -0
  97. data/log/.gitkeep +0 -0
  98. metadata +336 -0
  99. metadata.gz.sig +3 -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@coditsu.io. 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,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ group :test do
8
+ gem 'byebug'
9
+ gem 'factory_bot'
10
+ gem 'rspec'
11
+ gem 'simplecov'
12
+ end
@@ -0,0 +1,140 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ karafka (1.3.6)
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
+ multi_json (>= 1.12)
12
+ rake (>= 11.3)
13
+ ruby-kafka (>= 0.7.8)
14
+ thor (>= 0.20)
15
+ waterdrop (~> 1.3.0)
16
+ zeitwerk (~> 2.1)
17
+
18
+ GEM
19
+ remote: https://rubygems.org/
20
+ specs:
21
+ activesupport (6.0.2.2)
22
+ concurrent-ruby (~> 1.0, >= 1.0.2)
23
+ i18n (>= 0.7, < 2)
24
+ minitest (~> 5.1)
25
+ tzinfo (~> 1.1)
26
+ zeitwerk (~> 2.2)
27
+ byebug (11.1.3)
28
+ concurrent-ruby (1.1.6)
29
+ delivery_boy (1.0.1)
30
+ king_konf (~> 0.3)
31
+ ruby-kafka (~> 1.0)
32
+ diff-lcs (1.3)
33
+ digest-crc (0.5.1)
34
+ docile (1.3.2)
35
+ dry-configurable (0.11.5)
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.6)
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.0)
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.0)
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 (5.1.2)
85
+ activesupport (>= 4.2.0)
86
+ i18n (1.8.2)
87
+ concurrent-ruby (~> 1.0)
88
+ io-console (0.5.6)
89
+ irb (1.2.3)
90
+ reline (>= 0.0.1)
91
+ king_konf (0.3.7)
92
+ minitest (5.14.0)
93
+ multi_json (1.14.1)
94
+ rake (13.0.1)
95
+ reline (0.1.3)
96
+ io-console (~> 0.5)
97
+ rspec (3.9.0)
98
+ rspec-core (~> 3.9.0)
99
+ rspec-expectations (~> 3.9.0)
100
+ rspec-mocks (~> 3.9.0)
101
+ rspec-core (3.9.1)
102
+ rspec-support (~> 3.9.1)
103
+ rspec-expectations (3.9.1)
104
+ diff-lcs (>= 1.2.0, < 2.0)
105
+ rspec-support (~> 3.9.0)
106
+ rspec-mocks (3.9.1)
107
+ diff-lcs (>= 1.2.0, < 2.0)
108
+ rspec-support (~> 3.9.0)
109
+ rspec-support (3.9.2)
110
+ ruby-kafka (1.0.0)
111
+ digest-crc
112
+ simplecov (0.18.5)
113
+ docile (~> 1.1)
114
+ simplecov-html (~> 0.11)
115
+ simplecov-html (0.12.2)
116
+ thor (1.0.1)
117
+ thread_safe (0.3.6)
118
+ tzinfo (1.2.7)
119
+ thread_safe (~> 0.1)
120
+ waterdrop (1.3.4)
121
+ delivery_boy (>= 0.2, < 2.x)
122
+ dry-configurable (~> 0.8)
123
+ dry-monitor (~> 0.3)
124
+ dry-validation (~> 1.2)
125
+ ruby-kafka (>= 0.7.8)
126
+ zeitwerk (~> 2.1)
127
+ zeitwerk (2.3.0)
128
+
129
+ PLATFORMS
130
+ ruby
131
+
132
+ DEPENDENCIES
133
+ byebug
134
+ factory_bot
135
+ karafka!
136
+ rspec
137
+ simplecov
138
+
139
+ BUNDLED WITH
140
+ 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,101 @@
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 Karafka `1.3.x`.
6
+
7
+ If you're upgrading from `1.2.0`, please refer to our [Upgrade Notes article](https://mensfeld.pl/2019/09/karafka-framework-1-3-0-release-notes-ruby-kafka/).
8
+
9
+ If you are looking for the documentation for Karafka `1.2.x`, it can be found [here](https://github.com/karafka/wiki/tree/1.2).
10
+
11
+ ## About Karafka
12
+
13
+ Framework used to simplify Apache Kafka based Ruby applications development.
14
+
15
+ 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.
16
+
17
+ Karafka not only handles incoming messages but also provides tools for building complex data-flow applications that receive and send messages.
18
+
19
+ ## How does it work
20
+
21
+ 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.
22
+
23
+ ### Some things you might wonder about:
24
+
25
+ - You can integrate Karafka with **any** Ruby-based application.
26
+ - Karafka does **not** require Sidekiq or any other third party software (apart from Kafka itself).
27
+ - Karafka works with Ruby on Rails but it is a **standalone** framework that can work without it.
28
+ - Karafka has a **minimal** set of dependencies, so adding it won't be a huge burden for your already existing applications.
29
+ - 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.
30
+
31
+ Karafka based applications can be easily deployed to any type of infrastructure, including those based on:
32
+
33
+ * Heroku
34
+ * Capistrano
35
+ * Docker
36
+ * Terraform
37
+
38
+ ## Support
39
+
40
+ 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.
41
+
42
+ If you have any questions about using Karafka, feel free to join our [Gitter](https://gitter.im/karafka/karafka) chat channel.
43
+
44
+ ## Getting started
45
+
46
+ 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:
47
+
48
+ - [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/)
49
+ - [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/)
50
+
51
+ 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:
52
+
53
+ ```bash
54
+ git clone https://github.com/karafka/example-app ./example_app
55
+ ```
56
+
57
+ then, just bundle install all the dependencies:
58
+
59
+ ```bash
60
+ cd ./example_app
61
+ bundle install
62
+ ```
63
+
64
+ and follow the instructions from the [example app Wiki](https://github.com/karafka/example-app/blob/master/README.md).
65
+
66
+ **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.
67
+
68
+ 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.
69
+
70
+ ## Notice
71
+
72
+ 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.
73
+
74
+ ## References
75
+
76
+ * [Karafka framework](https://github.com/karafka/karafka)
77
+ * [Karafka Travis CI](https://travis-ci.org/karafka/karafka)
78
+ * [Karafka Coditsu](https://app.coditsu.io/karafka/repositories/karafka)
79
+
80
+ ## Note on contributions
81
+
82
+ First, thank you for considering contributing to Karafka! It's people like you that make the open source community such a great community!
83
+
84
+ Each pull request must pass all the RSpec specs and meet our quality requirements.
85
+
86
+ 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.
87
+
88
+ 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.
89
+
90
+ [![coditsu](https://coditsu.io/assets/quality_bar.svg)](https://app.coditsu.io/karafka/commit_builds)
91
+
92
+ ## Contributors
93
+
94
+ This project exists thanks to all the people who contribute.
95
+ <a href="https://github.com/karafka/karafka/graphs/contributors"><img src="https://opencollective.com/karafka/contributors.svg?width=890" /></a>
96
+
97
+ ## Sponsors
98
+
99
+ 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.
100
+
101
+ Please contact [Maciej Mensfeld](mailto:maciej@coditsu.io) 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
+ ZWovREM9bWVuc2ZlbGQvREM9cGwwHhcNMTkwNzMwMTQ1NDU0WhcNMjAwNzI5MTQ1
4
+ NDU0WjAjMSEwHwYDVQQDDBhtYWNpZWovREM9bWVuc2ZlbGQvREM9cGwwggGiMA0G
5
+ CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC9fCwtaHZG2SyyNXiH8r0QbJQx/xxl
6
+ dkvwWz9QGJO+O8rEx20FB1Ab+MVkfOscwIv5jWpmk1U9whzDPl1uFtIbgu+sk+Zb
7
+ uQlZyK/DPN6c+/BbBL+RryTBRyvkPLoCVwm7uxc/JZ1n4AI6eF4cCZ2ieZ9QgQbU
8
+ MQs2QPqs9hT50Ez/40GnOdadVfiDDGz+NME2C4ms0BriXwZ1tcRTfJIHe2xjIbbb
9
+ y5qRGfsLKcgMzvLQR24olixyX1MR0s4+Wveq3QL/gBhL4veUcv+UABJA8IJR0kyB
10
+ seHHutusiwZ1v3SjjjW1xLLrc2ARV0mgCb0WaK2T4iA3oFTGLh6Ydz8LNl31KQFv
11
+ 94nRd8IhmJxrhQ6dQ/WT9IXoa5S9lfT5lPJeINemH4/6QPABzf9W2IZlCdI9wCdB
12
+ TBaw57MKneGAYZiKjw6OALSy2ltQUCl3RqFl3VP7n8uFy1U987Q5VIIQ3O1UUsQD
13
+ Oe/h+r7GUU4RSPKgPlrwvW9bD/UQ+zF51v8CAwEAAaN3MHUwCQYDVR0TBAIwADAL
14
+ BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFJNIBHdfEUD7TqHqIer2YhWaWhwcMB0GA1Ud
15
+ EQQWMBSBEm1hY2llakBtZW5zZmVsZC5wbDAdBgNVHRIEFjAUgRJtYWNpZWpAbWVu
16
+ c2ZlbGQucGwwDQYJKoZIhvcNAQELBQADggGBAKA4eqko6BTNhlysip6rfBkVTGri
17
+ ZXsL+kRb2hLvsQJS/kLyM21oMlu+LN0aPj3qEFR8mE/YeDD8rLAfruBRTltPNbR7
18
+ xA5eE1gkxY5LfExUtK3b2wPqfmo7mZgfcsMwfYg/tUXw1WpBCnrhAJodpGH6SXmp
19
+ A40qFUZst0vjiOoO+aTblIHPmMJXoZ3K42dTlNKlEiDKUWMRKSgpjjYGEYalFNWI
20
+ hHfCz2r8L2t+dYdMZg1JGbEkq4ADGsAA8ioZIpJd7V4hI17u5TCdi7X5wh/0gN0E
21
+ CgP+nLox3D+l2q0QuQEkayr+auFYkzTCkF+BmEk1D0Ru4mcf3F4CJvEmW4Pzbjqt
22
+ i1tsCWPtJ4E/UUKnKaWKqGbjrjHJ0MuShYzHkodox5IOiCXIQg+1+YSzfXUV6WEK
23
+ KJG/fhg1JV5vVDdVy6x+tv5SQ5ctU0feCsVfESi3rE3zRd+nvzE9HcZ5aXeL1UtJ
24
+ nT5Xrioegu2w1jPyVEgyZgTZC5rvD0nNS5sFNQ==
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