flipp-ruby-kafka-temp-fork 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +97 -0
- data/.dockerignore +2 -0
- data/.gitignore +41 -0
- data/.gitmodules +0 -0
- data/.rspec +1 -0
- data/.rubocop.yml +56 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +466 -0
- data/Dockerfile +21 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +207 -0
- data/Guardfile +22 -0
- data/README.md +102 -0
- data/Rakefile +13 -0
- data/bin/flipp_ruby_kafka +4 -0
- data/deploy/artifactory.sh +8 -0
- data/deploy/config.json +4 -0
- data/docker-compose.yml +89 -0
- data/docs/UPGRADE_1.0.md +39 -0
- data/flipp-ruby-kafka.gemspec +34 -0
- data/kafkateria/factories/my_schema.rb +16 -0
- data/kafkateria/factories/my_schema_with_id.rb +16 -0
- data/lib/flipp_ruby_kafka.rb +73 -0
- data/lib/flipp_ruby_kafka/flipp_datadog_metrics.rb +15 -0
- data/lib/flipp_ruby_kafka/test_helpers.rb +59 -0
- data/lib/flipp_ruby_kafka/utils/platform_schema_validation.rb +77 -0
- data/lib/flipp_ruby_kafka/utils/platform_topic_validation.rb +41 -0
- data/lib/flipp_ruby_kafka/version.rb +5 -0
- data/lib/generators/flipp_ruby_kafka/schema_validation/schema_validation_generator.rb +23 -0
- data/lib/generators/flipp_ruby_kafka/topic_validation/topic_validation_generator.rb +22 -0
- data/spec/flipp_ruby_kafka_spec.rb +8 -0
- data/spec/integration/send_kafka_spec.rb +63 -0
- data/spec/phobos.yml +73 -0
- data/spec/schemas/com/my-namespace/MySchema-key.avsc +13 -0
- data/spec/schemas/com/my-namespace/MySchema.avsc +18 -0
- data/spec/schemas/com/my-namespace/MySchemaWithDateTimes.avsc +33 -0
- data/spec/schemas/com/my-namespace/MySchemaWithId.avsc +28 -0
- data/spec/spec_helper.rb +39 -0
- data/spec/utils/platform_schema_validation_spec.rb +54 -0
- data/spec/utils/platform_topic_validation_spec.rb +50 -0
- metadata +262 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1d678755ab40d9ab99ad003a75be21d785e4d5e8c78cc1028bd93856dd534d49
|
4
|
+
data.tar.gz: ec7e3833b40568f8400594c198b41adc92f241eed8d4e964ad8971e9ab8b83c9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ee2897cdc8062db671e488fd35391ec16eb43de95a4c6dcd5f3cba764396987cc3d34413670dd360d076dcbe1451332efc7fa68a4b696e64efb709537ed933f6
|
7
|
+
data.tar.gz: e2129786ccf077e509e51398ceb50b578596679c8c302285fe4268a64be2554a02f21740eaf7f0b799d9ab93f9823638ead5b4dc0848b63def6e5335f2255714
|
@@ -0,0 +1,97 @@
|
|
1
|
+
defaults: &defaults
|
2
|
+
parallelism: 1
|
3
|
+
working_directory: ~/workspace
|
4
|
+
docker:
|
5
|
+
- image: 421990735784.dkr.ecr.us-east-1.amazonaws.com/ci-build-environment:ruby-2.5
|
6
|
+
environment:
|
7
|
+
MYSQL_HOST: 127.0.01
|
8
|
+
PG_HOST: 127.0.0.1
|
9
|
+
- image: circleci/mysql:5.7
|
10
|
+
environment:
|
11
|
+
MYSQL_ALLOW_EMPTY_PASSWORD: true
|
12
|
+
MYSQL_DATABASE: test
|
13
|
+
- image: circleci/postgres:11-alpine-ram
|
14
|
+
environment:
|
15
|
+
POSTGRES_PASSWORD: root
|
16
|
+
|
17
|
+
version: 2
|
18
|
+
jobs:
|
19
|
+
build:
|
20
|
+
<<: *defaults
|
21
|
+
steps:
|
22
|
+
- checkout
|
23
|
+
- run:
|
24
|
+
name: Which bundler?
|
25
|
+
command: bundle -v
|
26
|
+
- run:
|
27
|
+
name: Install aws cli
|
28
|
+
command: sudo apt update && sudo apt-get install -y awscli
|
29
|
+
- run: aws s3 cp s3://flipp-platform-production/platform-param-decrypt/platform-param-decrypt_linux platform-param-decrypt_linux
|
30
|
+
- run: chmod +x platform-param-decrypt_linux
|
31
|
+
- run: mkdir vendor
|
32
|
+
- run: sudo chmod 1777 -R /home/circleci/.bundle /tmp
|
33
|
+
- run: ./platform-param-decrypt_linux -bundleConfig > ~/.bundle/config
|
34
|
+
- run: gem install bundler -v2.1 # 2.2.17 breaks https://github.com/rubygems/rubygems/issues/4581
|
35
|
+
|
36
|
+
# Restore bundle cache & npm cache
|
37
|
+
- restore_cache:
|
38
|
+
key: 'rails-{{ checksum "Gemfile.lock" }}'
|
39
|
+
|
40
|
+
# Bundle install dependencies in /tmp/
|
41
|
+
# so Dockerfile does not copy them since
|
42
|
+
# its base image is different than CircleCI
|
43
|
+
- run:
|
44
|
+
name: Bundle install
|
45
|
+
command: bundle install --path vendor/bundle --jobs=4 --retry=3
|
46
|
+
|
47
|
+
# Store bundle cache
|
48
|
+
- save_cache:
|
49
|
+
key: 'rails-{{ checksum "Gemfile.lock" }}'
|
50
|
+
paths:
|
51
|
+
- ~/workspace/vendor/bundle
|
52
|
+
|
53
|
+
- persist_to_workspace:
|
54
|
+
# Must be an absolute path, or relative path from working_directory
|
55
|
+
root: ~/workspace
|
56
|
+
# Must be relative path from root
|
57
|
+
paths:
|
58
|
+
- .
|
59
|
+
test-rspec:
|
60
|
+
<<: *defaults
|
61
|
+
steps:
|
62
|
+
- attach_workspace:
|
63
|
+
at: ~/workspace
|
64
|
+
- run: gem install bundler -v2.1
|
65
|
+
- run:
|
66
|
+
name: Point bundle to vendor/bundle
|
67
|
+
command: bundle --path vendor/bundle
|
68
|
+
- run: mkdir result
|
69
|
+
- run:
|
70
|
+
name: Running rspec
|
71
|
+
command: dockerize -wait tcp://127.0.0.1:3306 -wait tcp://127.0.0.1:5432 -timeout 1m bundle exec rspec --format progress --format RspecJunitFormatter -o result/rspec.xml
|
72
|
+
- store_test_results:
|
73
|
+
path: ~/workspace/result
|
74
|
+
|
75
|
+
publish-to-artifactory:
|
76
|
+
working_directory: ~/workspace
|
77
|
+
docker:
|
78
|
+
- image: 421990735784.dkr.ecr.us-east-1.amazonaws.com/ci-build-environment:ruby-2.5
|
79
|
+
steps:
|
80
|
+
- checkout
|
81
|
+
- run: chmod +x ./deploy/artifactory.sh && ./deploy/artifactory.sh
|
82
|
+
|
83
|
+
workflows:
|
84
|
+
version: 2
|
85
|
+
build-test-and-publish:
|
86
|
+
jobs:
|
87
|
+
- build
|
88
|
+
- test-rspec:
|
89
|
+
requires:
|
90
|
+
- build
|
91
|
+
- publish-to-artifactory:
|
92
|
+
filters:
|
93
|
+
branches:
|
94
|
+
only:
|
95
|
+
- master
|
96
|
+
requires:
|
97
|
+
- test-rspec
|
data/.dockerignore
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Created by .ignore support plugin (hsz.mobi)
|
2
|
+
### Ruby template
|
3
|
+
*.gem
|
4
|
+
*.rbc
|
5
|
+
/.config
|
6
|
+
/coverage/
|
7
|
+
/InstalledFiles
|
8
|
+
/pkg/
|
9
|
+
/spec/reports/
|
10
|
+
/spec/examples.txt
|
11
|
+
/test/tmp/
|
12
|
+
/test/version_tmp/
|
13
|
+
/tmp/
|
14
|
+
/log/
|
15
|
+
|
16
|
+
# Used by dotenv library to load environment variables.
|
17
|
+
# .env
|
18
|
+
|
19
|
+
## Documentation cache and generated files:
|
20
|
+
/.yardoc/
|
21
|
+
/_yardoc/
|
22
|
+
/doc/
|
23
|
+
/rdoc/
|
24
|
+
|
25
|
+
## Environment normalization:
|
26
|
+
/.bundle/
|
27
|
+
/vendor/bundle
|
28
|
+
/lib/bundler/man/
|
29
|
+
|
30
|
+
# for a library or gem, you might want to ignore these files since the code is
|
31
|
+
# intended to run in multiple environments; otherwise, check them in:
|
32
|
+
# Gemfile.lock
|
33
|
+
# .ruby-version
|
34
|
+
# .ruby-gemset
|
35
|
+
|
36
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
37
|
+
.rvmrc
|
38
|
+
|
39
|
+
test.sqlite3
|
40
|
+
|
41
|
+
.idea
|
data/.gitmodules
ADDED
File without changes
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper --tag ~integration --format documentation
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
inherit_gem:
|
2
|
+
flipp_ruby_style: rubocop.yml
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
Exclude:
|
6
|
+
- 'lib/flipp_ruby_kafka/monkey_patches/*.rb'
|
7
|
+
|
8
|
+
RSpec/ExpectActual:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
RSpec/BeforeAfterAll:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Rails/ApplicationRecord:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Rails/TimeZone:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Style/DateTime:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
RSpec/ContextWording:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
RSpec/MessageSpies:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
RSpec/EmptyExampleGroup:
|
30
|
+
Exclude:
|
31
|
+
- "spec/spec_helper.rb"
|
32
|
+
|
33
|
+
Lint/UnusedMethodArgument:
|
34
|
+
Exclude:
|
35
|
+
- 'lib/flipp_ruby_kafka/publish_backend.rb'
|
36
|
+
|
37
|
+
Security/YAMLLoad:
|
38
|
+
Exclude:
|
39
|
+
- 'lib/flipp_ruby_kafka.rb'
|
40
|
+
|
41
|
+
Lint/UnusedBlockArgument:
|
42
|
+
Exclude:
|
43
|
+
- 'lib/flipp_ruby_kafka/test_helpers.rb'
|
44
|
+
|
45
|
+
Metrics/ParameterLists:
|
46
|
+
Exclude:
|
47
|
+
- 'lib/flipp_ruby_kafka/test_helpers.rb'
|
48
|
+
|
49
|
+
Security/Eval:
|
50
|
+
Exclude:
|
51
|
+
- 'spec/spec_helper.rb'
|
52
|
+
|
53
|
+
Lint/RescueException:
|
54
|
+
Exclude:
|
55
|
+
- 'spec/spec_helper.rb'
|
56
|
+
- 'lib/flipp_ruby_kafka/utils/executor.rb'
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
flipp-ruby-kafka
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.0
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,466 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [2.4.1] - 2021-05-13
|
9
|
+
- Change localhost to 127.0.0.1 for better use with Docker.
|
10
|
+
|
11
|
+
## [2.4.0] - 2021-01-28
|
12
|
+
- Bump version of ruby-kafka.
|
13
|
+
|
14
|
+
## [2.3.2] - 2020-10-13
|
15
|
+
- Added generators for schema and topic validation - see README.
|
16
|
+
|
17
|
+
## [2.3.1] - 2020-08-11
|
18
|
+
- Update ddtrace requirement
|
19
|
+
|
20
|
+
## [2.3.0] - 2020-03-19
|
21
|
+
- Non-beta version!
|
22
|
+
|
23
|
+
## [2.3.0-beta2] - 2020-01-30
|
24
|
+
- Fix crash when not using ActiveRecord.
|
25
|
+
|
26
|
+
# [2.3.0-beta1] - 2020-01-17
|
27
|
+
- Bump Deimos version to 1.5.
|
28
|
+
|
29
|
+
## [2.2.0-beta5] - 2019-12-17
|
30
|
+
- Bugfix for previous release.
|
31
|
+
|
32
|
+
## [2.2.0-beta4] - 2019-12-16
|
33
|
+
- Clone loggers on startup.
|
34
|
+
|
35
|
+
## [2.2.0-beta2] - 2019-12-16
|
36
|
+
- Bump Deimos version to 1.4.
|
37
|
+
|
38
|
+
## [2.1.4] - 2019-12-04
|
39
|
+
- Bugfix related to phobos_config_file being set incorrectly.
|
40
|
+
|
41
|
+
## [2.1.2] - 2019-11-26
|
42
|
+
- Bugfix related to the fatal_error block for the DB
|
43
|
+
|
44
|
+
## [2.1.0] - 2019-09-12
|
45
|
+
- Fail forever if the DB is down when getting an error consuming a message.
|
46
|
+
|
47
|
+
## [2.0.1] - 2019-09-11
|
48
|
+
- Change required Deimos version to ~> 1
|
49
|
+
|
50
|
+
## [2.0.0] - 2019-09-03
|
51
|
+
- Official release of FlippRubyKafka 2.0!
|
52
|
+
|
53
|
+
## [2.0.0-beta21] - 2019-08-29
|
54
|
+
- Update Deimos beta version
|
55
|
+
|
56
|
+
## [2.0.0-beta20] - 2019-08-28
|
57
|
+
- Fix bug where scripts outside the main Rails directory wouldn't start up
|
58
|
+
|
59
|
+
## [2.0.0-beta19] - 2019-08-28
|
60
|
+
- Update Deimos beta version
|
61
|
+
|
62
|
+
## [2.0.0-beta18] - 2019-08-26
|
63
|
+
- Update Deimos beta version
|
64
|
+
|
65
|
+
## [2.0.0-beta17] - 2019-08-22
|
66
|
+
- Update Deimos beta version
|
67
|
+
|
68
|
+
## [2.0.0-beta16] - 2019-08-20
|
69
|
+
- Fix for test helpers being included before the gem itself.
|
70
|
+
|
71
|
+
## [2.0.0-beta15] - 2019-08-09
|
72
|
+
- Update Deimos beta version
|
73
|
+
|
74
|
+
## [2.0.0-beta14] - 2019-08-08
|
75
|
+
- Update Deimos beta version
|
76
|
+
|
77
|
+
## [2.0.0-beta13] - 2019-08-07
|
78
|
+
- Update Deimos beta version
|
79
|
+
|
80
|
+
## [2.0.0-beta12] - 2019-08-06
|
81
|
+
- Update Deimos beta version
|
82
|
+
|
83
|
+
## [2.0.0-beta11] - 2019-08-02
|
84
|
+
- Update Deimos beta version
|
85
|
+
|
86
|
+
## [2.0.0-beta10] - 2019-08-01
|
87
|
+
- Update Datadog configuration to be separate from Railtie.
|
88
|
+
- Removed phobos:start rake task.
|
89
|
+
|
90
|
+
## [2.0.0-beta3] - 2019-06-12
|
91
|
+
- Change over all functionality to use the open-source Deimos project.
|
92
|
+
|
93
|
+
## [1.0.0-beta19] - 2019-07-19
|
94
|
+
- Add Kafkateria support for trait parameters
|
95
|
+
|
96
|
+
## [1.0.0-beta14] - 2019-05-27
|
97
|
+
- Another fix for DB backend for encoded partition keys. -_-
|
98
|
+
|
99
|
+
## [1.0.0-beta13] - 2019-05-27
|
100
|
+
- Another fix for DB backend for encoded keys.
|
101
|
+
|
102
|
+
## [1.0.0-beta12] - 2019-05-23
|
103
|
+
- Fix DB backend so it saves messages correctly in binary format.
|
104
|
+
|
105
|
+
## [1.0.0-beta11] - 2019-05-06
|
106
|
+
- Return the produced messages from latest Kafkateria version with `kafkateria_produce_messages`.
|
107
|
+
|
108
|
+
## [1.0.0-beta10] - 2019-04-17
|
109
|
+
- Fix crash when using InlineConsumer with a config_class
|
110
|
+
- Proactively raise an error when calling `get_messages_for` without enough configuration
|
111
|
+
|
112
|
+
## [1.0.0-beta9] - 2019-04-16
|
113
|
+
- Updated TestHelper to be able to send null payloads
|
114
|
+
|
115
|
+
## [1.0.0-beta8] - 2019-04-03
|
116
|
+
- Fixed the TestHelpers fix correctly -_-
|
117
|
+
|
118
|
+
## [1.0.0-beta7] - 2019-03-28
|
119
|
+
- FIX: TestHelpers was stubbing out Datadog tracing in a way that didn't
|
120
|
+
preserve blocks that were passed in (e.g. for rendering ActionMailer).
|
121
|
+
|
122
|
+
## [1.0.0-beta6] - 2019-03-012
|
123
|
+
- BREAKING CHANGE - added config.report_lag to make lag reporting optional.
|
124
|
+
Default is now FALSE.
|
125
|
+
|
126
|
+
## [1.0.0-beta5] - 2019-03-08
|
127
|
+
- Fixed bug with KafkaMessage not saving
|
128
|
+
|
129
|
+
## [1.0.0-beta4] - 2019-03-08
|
130
|
+
- Changed Kafka message DB tables to use blobs instead of text.
|
131
|
+
|
132
|
+
## [1.0.0-beta3] - 2019-03-07
|
133
|
+
- A number of fixes for Rails 3
|
134
|
+
- Fixes based on integration testing
|
135
|
+
|
136
|
+
## [1.0.2-beta] - 2019-02-14
|
137
|
+
- Removed metadata monkey patch for RubyKafka as it's no longer needed.
|
138
|
+
|
139
|
+
## [1.0.1-beta] - 2019-01-21
|
140
|
+
- Major breaking change!
|
141
|
+
- Introduce new key config of "none: true" which **must be used** if not
|
142
|
+
passing any keys to the producer.
|
143
|
+
- Removal of KafkaPublishFailure.
|
144
|
+
- Change KafkaSource to send messages *inside* the transaction instead of
|
145
|
+
using after_commit.
|
146
|
+
- In TestHelpers, changed logic so that producers and consumers are only
|
147
|
+
stubbed when `stub_producers_and_consumers!` is called manually.
|
148
|
+
This allows for easier management of integration tests.
|
149
|
+
- Removed checking of `:kafka_integration` metadata key.
|
150
|
+
- Additional features:
|
151
|
+
- Introducing new concept of "backends", including a database backend.
|
152
|
+
- Add `publish_backend` to Configuration
|
153
|
+
- Add `start_db_backend!` to base class
|
154
|
+
- Add `force_send: true` option to `Producer#publish_list`,
|
155
|
+
`ActiveRecordProducer.send_event` and `ActiveRecordProducer.send_events`
|
156
|
+
- Start a Kafka sending thread when `publish_backend` is set to `db` unless
|
157
|
+
configured not to
|
158
|
+
|
159
|
+
## [0.7.14] - 2019-04-17
|
160
|
+
- Fix crash when using InlineConsumer with a config_class
|
161
|
+
- Proactively raise an error when calling `get_messages_for` without enough configuration
|
162
|
+
|
163
|
+
## [0.7.13] - 2019-04-16
|
164
|
+
- Updated TestHelper to be able to send null payloads
|
165
|
+
|
166
|
+
## [0.7.12] - 2019-04-03
|
167
|
+
- Fixed the TestHelpers fix correctly -_-
|
168
|
+
|
169
|
+
## [0.7.11] - 2019-03-28
|
170
|
+
- FIX: TestHelpers was stubbing out Datadog tracing in a way that didn't
|
171
|
+
preserve blocks that were passed in (e.g. for rendering ActionMailer).
|
172
|
+
|
173
|
+
## [0.7.10] - 2019-03-07
|
174
|
+
- FIX: InlineConsumer was caching the decoder when asked for multiple
|
175
|
+
topics in a row
|
176
|
+
|
177
|
+
## [0.7.9.1] - 2019-03-07
|
178
|
+
- FIX: Raise an error when Kafkateria returns a non-200 response code in
|
179
|
+
Kafkateria helper methods.
|
180
|
+
|
181
|
+
## [0.7.8] - 2019-03-07
|
182
|
+
- Added `kafkateria_get_messages` helper method.
|
183
|
+
|
184
|
+
## [0.7.7] - 2019-02-28
|
185
|
+
- Fix for kafkateria_delete_topic method.
|
186
|
+
|
187
|
+
## [0.7.6] - 2019-02-11
|
188
|
+
- Added Kafkateria helper methods to TestHelpers.
|
189
|
+
|
190
|
+
## [0.7.5] - 2019-02-11
|
191
|
+
- Added `:kafka_integration` metadata to disable stubbing of producers/consumers.
|
192
|
+
|
193
|
+
## [0.7.4] - 2019-02-09
|
194
|
+
- Added Utils::InlineConsumer for integration testing.
|
195
|
+
|
196
|
+
## [0.7.2] - 2019-01-19
|
197
|
+
- Added watched_attribute override functionality for producers.
|
198
|
+
|
199
|
+
## [0.7.1] - 2019-01-03
|
200
|
+
- Official 0.7 release.
|
201
|
+
|
202
|
+
## [0.7.1-beta10] - 2018-12-20
|
203
|
+
- Fixed issue with schema coercer not coercing values to boolean.
|
204
|
+
|
205
|
+
## [0.7.1-beta9] - 2018-12-12
|
206
|
+
- Monkey patched Phobos bug on startup.
|
207
|
+
|
208
|
+
## [0.7.1-beta8] - 2018-12-07
|
209
|
+
- Fixed bug where attributes sent to generate_payloads_for_resend() were not
|
210
|
+
with indifferent access.
|
211
|
+
|
212
|
+
## [0.7.1-beta7] - 2018-12-07
|
213
|
+
- Forgot to merge master -_-
|
214
|
+
|
215
|
+
## [0.7.1-beta6] - 2018-12-05
|
216
|
+
- Do not save publish failures if the failure is not related to Kafka producing
|
217
|
+
- Do not raise an exception if the failure is related to Kafka producing and is
|
218
|
+
already caught
|
219
|
+
|
220
|
+
## [0.7.1-beta5] - 2018-11-30
|
221
|
+
- Rubocop fixes.
|
222
|
+
|
223
|
+
## [0.7.1.-beta4] - 2018-11-29
|
224
|
+
- Remove heartbeat thread logic and revert to RubyKafka in-thread heartbeating.
|
225
|
+
|
226
|
+
## [0.7.1-beta3] - 2018-11-26
|
227
|
+
- Centralize error notifications so both publish and Avro failures get sent
|
228
|
+
to the same notification, `produce_error`.
|
229
|
+
|
230
|
+
## [0.7.1-beta2] - 2018-11-23
|
231
|
+
- Fix KafkaPublishFailure so it sends for async messages as well.
|
232
|
+
|
233
|
+
## [0.7.0-beta] - 2018-11-21
|
234
|
+
- Bumped ruby-kafka version up to 0.7.4.
|
235
|
+
|
236
|
+
## [0.6.22] - 2018-12-07
|
237
|
+
- Fixed bug where attributes sent to generate_payloads_for_resend() were not
|
238
|
+
with indifferent access.
|
239
|
+
|
240
|
+
## [0.6.22] - 2018-12-07
|
241
|
+
- Fixed bug where attributes sent to generate_payloads_for_resend() were not
|
242
|
+
with indifferent access.
|
243
|
+
|
244
|
+
## [0.6.21] - 2018-12-01
|
245
|
+
- Fixed bug where nil payloads were being coerced into strings incorrectly instead
|
246
|
+
of raising an error.
|
247
|
+
|
248
|
+
## [0.6.20] - 2018-11-20
|
249
|
+
- Added publish_error DataDog metric.
|
250
|
+
|
251
|
+
## [0.6.19] - 2018-11-16
|
252
|
+
- Fixed crash on exit if Kafka client didn't exist.
|
253
|
+
|
254
|
+
## [0.6.18] - 2018-11-14
|
255
|
+
- Updated README.
|
256
|
+
- Fixed bug when errors occurred with KafkaPublishFailure.
|
257
|
+
|
258
|
+
## [0.6.17] - 2018-11-13
|
259
|
+
- Bugfix: Send all outstanding messages when the app exits.
|
260
|
+
- Bugfix: Using key_schema in a consumer should use AvroTurf::Messaging instead
|
261
|
+
of AvroTurf.
|
262
|
+
|
263
|
+
## [0.6.16] - 2018-11-09
|
264
|
+
- Bugfix: Crash when there's a problem with lag reporting
|
265
|
+
|
266
|
+
## [0.6.15] - 2018-11-06
|
267
|
+
- Bugfix: Ignore attr_protected in older versions of Rails.
|
268
|
+
|
269
|
+
## [0.6.14] - 2018-11-05
|
270
|
+
- Bugfix: Do not save updated_at and created_at for records if they're in the schema.
|
271
|
+
|
272
|
+
## [0.6.13] - 2018-11-03
|
273
|
+
- Add `FlippRubyKafka.disable_producers` method.
|
274
|
+
|
275
|
+
## [0.6.12] - 2018-10-04
|
276
|
+
- Fix for union types with ActiveRecordConsumer.
|
277
|
+
|
278
|
+
## [0.6.11] - 2018-09-14
|
279
|
+
- Fix for crash when given a timestamp which is blank on the consumer side
|
280
|
+
|
281
|
+
## [0.6.10] - 2018-09-14
|
282
|
+
- Allow KafkaSource to use multiple producers.
|
283
|
+
- Do not crash if Avro encoding fails and reraise_consumer_errors is set to false.
|
284
|
+
- Fix for test helper crash when failing `expect(topic).not_to have_sent(anything)`
|
285
|
+
|
286
|
+
## [0.6.9] - 2018-09-07
|
287
|
+
- Fix bug where logger was logging the non-coerced version of the payload instead
|
288
|
+
of what was actually sent.
|
289
|
+
|
290
|
+
## [0.6.8] - 2018-09-06
|
291
|
+
- Fix bug where nil payloads were crashing.
|
292
|
+
|
293
|
+
## [0.6.7] - 2018-08-30
|
294
|
+
- Lock RubyKafka version to 0.6 for now since 0.7 breaks our monkey patch
|
295
|
+
- Coerce nil values to boolean for ActiveRecordProducers
|
296
|
+
|
297
|
+
## [0.6.5] - 2018-08-20
|
298
|
+
- Fix for KafkaPublishFailure generator not working with PostgreSQL.
|
299
|
+
|
300
|
+
## [0.6.4] - 2018-08-16
|
301
|
+
- Added PlatformSchemaValidation class to generate the schema validation file.
|
302
|
+
- Fixed bug where the producer was not logging generated message ID / timestamps.
|
303
|
+
|
304
|
+
## [0.6.3] - 2018-08-10
|
305
|
+
- Updated avro-patches to avoid needing a monkey-patch
|
306
|
+
- Fixes to TestHelpers to work with RSpec 2.
|
307
|
+
|
308
|
+
## [0.6.2] - 2018-08-03
|
309
|
+
- Fixed TestHelpers as well
|
310
|
+
|
311
|
+
## [0.6.1] - 2018-08-03
|
312
|
+
- Fixed a bug with ActiveRecordConsumer crashing with Avro-encoded keys.
|
313
|
+
|
314
|
+
## [0.6.0] - 2018-07-30
|
315
|
+
- Update to Phobos 1.8
|
316
|
+
- decode_key no longer needed for consumers with encoded keys
|
317
|
+
|
318
|
+
## [0.5.22] - 2018-07-22
|
319
|
+
- Added the ability to specify partition keys separate from payload keys.
|
320
|
+
|
321
|
+
## [0.5.21] - 2018-07-22
|
322
|
+
- Added the KafkaSource mixin.
|
323
|
+
- Added the PublishFailure model and generator.
|
324
|
+
|
325
|
+
## [0.5.20] - 2018-07-13
|
326
|
+
- One more issue related to heartbeat threading.
|
327
|
+
|
328
|
+
## [0.5.19] - 2018-07-12
|
329
|
+
- Fix for a different crash :(
|
330
|
+
|
331
|
+
## [0.5.18] - 2018-07-12
|
332
|
+
- Fix for a crash that can happen due to multithreading.
|
333
|
+
|
334
|
+
## [0.5.17] - 2018-07-10
|
335
|
+
- Changed heartbeat to be attached to the RubyKafka consumer instead of the
|
336
|
+
Phobos Executor. This should solve some of the stability problems around
|
337
|
+
heartbeat timeouts since we should now only be sending heartbeats from a
|
338
|
+
thread and not the main consumer loop.
|
339
|
+
|
340
|
+
## [0.5.16] - 2018-06-27
|
341
|
+
- Fixed an issue where encoding with key schemas would use the namespaced
|
342
|
+
subject in the schema registry instead of "{topic}-key".
|
343
|
+
|
344
|
+
## [0.5.15] - 2018-06-20
|
345
|
+
|
346
|
+
- Yet another fix related to heartbeats (only send lag on successful heartbeats)
|
347
|
+
- Expose method to stub individual producer/consumer classes in tests.
|
348
|
+
|
349
|
+
## [0.5.14] - 2018-06-11
|
350
|
+
|
351
|
+
- Send a new metric, handler/time:time_delayed, which records the difference in
|
352
|
+
time between when a message was sent and when it was consumed
|
353
|
+
|
354
|
+
## [0.5.13] - 2018-06-01
|
355
|
+
|
356
|
+
- Yet another fix related to heartbeat threads.
|
357
|
+
- Allow lag to be reported with Rails 3.
|
358
|
+
|
359
|
+
## [0.5.12] - 2018-06-08
|
360
|
+
|
361
|
+
- Fixed a bug introduced with ruby-kafka 0.6.6 which causes heartbeats to fail.
|
362
|
+
|
363
|
+
## [0.5.11] - 2018-06-01
|
364
|
+
|
365
|
+
- Internal refactor related to heartbeat thread again.
|
366
|
+
|
367
|
+
## [0.5.10] - 2018-05-30
|
368
|
+
|
369
|
+
- Fixed another bug with heartbeat threads to ensure they shut down correctly.
|
370
|
+
|
371
|
+
## [0.5.9] - 2018-05-29
|
372
|
+
|
373
|
+
- Fixed lag reporting to work with batch consuming.
|
374
|
+
- Fix TestHelpers to work with RSpec 2.
|
375
|
+
|
376
|
+
## [0.5.8] - 2018-05-24
|
377
|
+
|
378
|
+
- Added lag reporting to DataDog.
|
379
|
+
|
380
|
+
## [0.5.7] - 2018-05-18
|
381
|
+
|
382
|
+
- Set sync_produce to true when running Kafka consumers via rake phobos:start.
|
383
|
+
- Set Phobos/RubyKafka to use the same JSON logger as FlippRubyKafka.
|
384
|
+
- Updated failure message for the have_sent matcher to provide more information
|
385
|
+
(diff of the messages)
|
386
|
+
|
387
|
+
## [0.5.6] - 2018-05-15
|
388
|
+
|
389
|
+
- Fixed bug with heartbeat threads where they would not shut down in a timely
|
390
|
+
fashion.
|
391
|
+
|
392
|
+
## [0.5.5] - 2018-05-14
|
393
|
+
|
394
|
+
- Throw validation errors when the payload has extra fields, not just when
|
395
|
+
it's missing fields.
|
396
|
+
- Add ActiveSupport::Notifications instrumentation.
|
397
|
+
|
398
|
+
## [0.5.4] - 2018-05-08
|
399
|
+
|
400
|
+
- Actually test local schemas against payloads.
|
401
|
+
- Allow `field_config` to take a symbol or string as the field name.
|
402
|
+
|
403
|
+
## [0.5.3] - 2018-05-04
|
404
|
+
|
405
|
+
- Fixes for testing ActiveRecordConsumer.
|
406
|
+
|
407
|
+
## [0.5.2] - 2018-05-04
|
408
|
+
|
409
|
+
- Added ActiveRecordConsumer.
|
410
|
+
|
411
|
+
## [0.5.1] - 2018-05-02
|
412
|
+
|
413
|
+
### Fixed
|
414
|
+
|
415
|
+
- Auto-coercion correctly works with union types and null payloads.
|
416
|
+
|
417
|
+
## [0.5] - 2018-05-02
|
418
|
+
|
419
|
+
### Changed
|
420
|
+
|
421
|
+
- Some fields are now auto-coerced to types matching the schema.
|
422
|
+
|
423
|
+
## [0.4.6] - 2018-04-30
|
424
|
+
|
425
|
+
### Fixed
|
426
|
+
|
427
|
+
- Using `FlippDatadog.time` was broken in RSpecs.
|
428
|
+
|
429
|
+
## [0.4.5] - 2018-04-24
|
430
|
+
|
431
|
+
### Changed
|
432
|
+
|
433
|
+
- `ActiveRecordProducer.generate_payload` now doesn't care whether the keys
|
434
|
+
returned are strings or symbols.
|
435
|
+
|
436
|
+
## [0.4.4] - 2018-04-22
|
437
|
+
|
438
|
+
### Changed
|
439
|
+
|
440
|
+
- Topic is now passed into `on_producer_error`.
|
441
|
+
|
442
|
+
## [0.4.3] - 2018-04-22
|
443
|
+
|
444
|
+
### Added
|
445
|
+
|
446
|
+
- Added `on_producer_error` to configuration.
|
447
|
+
|
448
|
+
## [0.4.2] - 2018-04-22
|
449
|
+
|
450
|
+
### Fixed
|
451
|
+
|
452
|
+
- Fix for crash when using `import` on records with an ActiveRecordProducer.
|
453
|
+
|
454
|
+
## [0.4.1] - 2018-04-21
|
455
|
+
|
456
|
+
### Added
|
457
|
+
|
458
|
+
- Added ActiveRecordProducer.
|
459
|
+
- Automatically add timestamps to the message if a `timestamp` field is in
|
460
|
+
the schema and the payload doesn't have a corresponding value.
|
461
|
+
|
462
|
+
## [0.4] - 2018-04-20
|
463
|
+
|
464
|
+
### Changed
|
465
|
+
|
466
|
+
- Change the schema names used to reflect best practices (`{topic_name}-value`).
|