karafka 2.0.0.alpha3 → 2.0.0.alpha4
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/bin/integrations +1 -1
- data/bin/stress +1 -1
- data/lib/active_job/karafka.rb +16 -15
- data/lib/karafka/contracts/consumer_group_topic.rb +1 -0
- data/lib/karafka/routing/subscription_group.rb +1 -1
- data/lib/karafka/routing/subscription_groups_builder.rb +1 -0
- data/lib/karafka/routing/topic.rb +1 -0
- data/lib/karafka/setup/config.rb +3 -0
- data/lib/karafka/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8ed5005d3288abb4f9f6389fa126b5434b5a7a6df729e924695d38624e167e5
|
4
|
+
data.tar.gz: aa802a441d9c9cb1275260ba9b290c8c4c72acf125ca72efaafc58538a6c8b20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ad458acdb42c28d04895db1aa348d0ab10177c0829e7b19fc9fd8b23aaac5fc17feac5e1366cd6444d1e60903b087be1b24298b7764a98f8f372a325afb7cee
|
7
|
+
data.tar.gz: fb1de540a2c50d26467585bb720a636726955e65f1cea1ca055ef4a9f10d66db233928ca8b067d225d6c935f779d50f2381660ddcaa0d86d6c5b0b8a8ed991e1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Karafka framework changelog
|
2
2
|
|
3
|
+
## 2.0.0-alpha4 (Unreleased)
|
4
|
+
- Rails support without ActiveJob queue adapter usage (#805)
|
5
|
+
|
3
6
|
## 2.0.0-alpha3 (2022-03-16)
|
4
7
|
- Restore 'app.initialized' state and add notification on it
|
5
8
|
- Fix the installation flow for Rails and add integration tests for this scenario
|
data/Gemfile.lock
CHANGED
data/bin/integrations
CHANGED
@@ -25,7 +25,7 @@ CONCURRENCY = 4
|
|
25
25
|
class Scenario
|
26
26
|
# How long a scenario can run before we kill it
|
27
27
|
# This is a fail-safe just in case something would hang
|
28
|
-
MAX_RUN_TIME = 60 *
|
28
|
+
MAX_RUN_TIME = 60 * 2
|
29
29
|
|
30
30
|
# There are rare cases where Karafka may force shutdown for some of the integration cases
|
31
31
|
# This includes exactly those
|
data/bin/stress
CHANGED
data/lib/active_job/karafka.rb
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
require 'active_job
|
5
|
-
|
3
|
+
begin
|
4
|
+
require 'active_job'
|
5
|
+
require_relative 'queue_adapters/karafka_adapter'
|
6
6
|
|
7
|
-
module ActiveJob
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
module ActiveJob
|
8
|
+
# Namespace for usage simplification outside of Rails where Railtie will not kick in.
|
9
|
+
# That way a require 'active_job/karafka' should be enough to use it
|
10
|
+
module Karafka
|
11
|
+
end
|
11
12
|
end
|
12
|
-
end
|
13
|
-
|
14
|
-
# We extend routing builder by adding a simple wrapper for easier jobs topics defining
|
15
|
-
# This needs to be extended here as it is going to be used in karafka routes, hence doing that in
|
16
|
-
# the railtie initializer would be too late
|
17
|
-
::Karafka::Routing::Builder.include ::Karafka::ActiveJob::RoutingExtensions
|
18
|
-
::Karafka::Routing::Proxy.include ::Karafka::ActiveJob::RoutingExtensions
|
19
13
|
|
20
|
-
# We extend
|
14
|
+
# We extend routing builder by adding a simple wrapper for easier jobs topics defining
|
15
|
+
# This needs to be extended here as it is going to be used in karafka routes, hence doing that in
|
16
|
+
# the railtie initializer would be too late
|
17
|
+
::Karafka::Routing::Builder.include ::Karafka::ActiveJob::RoutingExtensions
|
18
|
+
::Karafka::Routing::Proxy.include ::Karafka::ActiveJob::RoutingExtensions
|
19
|
+
rescue LoadError
|
20
|
+
# We extend ActiveJob stuff in the railtie
|
21
|
+
end
|
@@ -10,6 +10,7 @@ module Karafka
|
|
10
10
|
required(:id).filled(:str?, format?: Karafka::Contracts::TOPIC_REGEXP)
|
11
11
|
required(:kafka).filled
|
12
12
|
required(:max_messages) { int? & gteq?(1) }
|
13
|
+
required(:initial_offset).filled(included_in?: %w[earliest latest])
|
13
14
|
required(:max_wait_time).filled { int? & gteq?(10) }
|
14
15
|
required(:manual_offset_management).filled(:bool?)
|
15
16
|
required(:name).filled(:str?, format?: Karafka::Contracts::TOPIC_REGEXP)
|
@@ -41,7 +41,7 @@ module Karafka
|
|
41
41
|
|
42
42
|
kafka[:'client.id'] ||= Karafka::App.config.client_id
|
43
43
|
kafka[:'group.id'] ||= @topics.first.consumer_group.id
|
44
|
-
kafka[:'auto.offset.reset'] ||=
|
44
|
+
kafka[:'auto.offset.reset'] ||= @topics.first.initial_offset
|
45
45
|
# Karafka manages the offsets based on the processing state, thus we do not rely on the
|
46
46
|
# rdkafka offset auto-storing
|
47
47
|
kafka[:'enable.auto.offset.store'] = 'false'
|
data/lib/karafka/setup/config.rb
CHANGED
@@ -54,6 +54,9 @@ module Karafka
|
|
54
54
|
setting :consumer_persistence, default: true
|
55
55
|
# Default deserializer for converting incoming data into ruby objects
|
56
56
|
setting :deserializer, default: Karafka::Serialization::Json::Deserializer.new
|
57
|
+
# option [String] should we start with the earliest possible offset or latest
|
58
|
+
# This will set the `auto.offset.reset` value unless present in the kafka scope
|
59
|
+
setting :initial_offset, default: 'earliest'
|
57
60
|
# option [Boolean] should we leave offset management to the user
|
58
61
|
setting :manual_offset_management, default: false
|
59
62
|
# options max_messages [Integer] how many messages do we want to fetch from Kafka in one go
|
data/lib/karafka/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: karafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
R2P11bWoCtr70BsccVrN8jEhzwXngMyI2gVt750Y+dbTu1KgRqZKp/ECe7ZzPzXj
|
35
35
|
pIy9vHxTANKYVyI4qj8OrFdEM5BQNu8oQpL0iQ==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2022-03-
|
37
|
+
date: 2022-03-20 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: dry-configurable
|
metadata.gz.sig
CHANGED
Binary file
|