karafka 2.4.16 → 2.4.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +2 -2
- data/LICENSE +7 -2
- data/lib/karafka/base_consumer.rb +7 -7
- data/lib/karafka/instrumentation/notifications.rb +1 -0
- data/lib/karafka/pro/active_job/consumer.rb +2 -10
- data/lib/karafka/pro/active_job/dispatcher.rb +2 -10
- data/lib/karafka/pro/active_job/job_options_contract.rb +2 -10
- data/lib/karafka/pro/base_consumer.rb +2 -10
- data/lib/karafka/pro/cleaner/errors.rb +2 -10
- data/lib/karafka/pro/cleaner/messages/message.rb +14 -12
- data/lib/karafka/pro/cleaner/messages/messages.rb +2 -10
- data/lib/karafka/pro/cleaner/messages/metadata.rb +41 -0
- data/lib/karafka/pro/cleaner.rb +3 -10
- data/lib/karafka/pro/connection/manager.rb +2 -10
- data/lib/karafka/pro/connection/multiplexing/listener.rb +2 -10
- data/lib/karafka/pro/contracts/base.rb +2 -10
- data/lib/karafka/pro/contracts/server_cli_options.rb +2 -10
- data/lib/karafka/pro/encryption/cipher.rb +2 -10
- data/lib/karafka/pro/encryption/contracts/config.rb +2 -10
- data/lib/karafka/pro/encryption/errors.rb +2 -10
- data/lib/karafka/pro/encryption/messages/middleware.rb +2 -10
- data/lib/karafka/pro/encryption/messages/parser.rb +2 -10
- data/lib/karafka/pro/encryption/setup/config.rb +2 -10
- data/lib/karafka/pro/encryption.rb +2 -10
- data/lib/karafka/pro/instrumentation/performance_tracker.rb +2 -10
- data/lib/karafka/pro/iterator/expander.rb +2 -10
- data/lib/karafka/pro/iterator/tpl_builder.rb +2 -10
- data/lib/karafka/pro/iterator.rb +2 -10
- data/lib/karafka/pro/loader.rb +2 -10
- data/lib/karafka/pro/processing/adaptive_iterator/consumer.rb +2 -10
- data/lib/karafka/pro/processing/adaptive_iterator/tracker.rb +2 -10
- data/lib/karafka/pro/processing/collapser.rb +2 -10
- data/lib/karafka/pro/processing/coordinator.rb +2 -10
- data/lib/karafka/pro/processing/coordinators/errors_tracker.rb +2 -10
- data/lib/karafka/pro/processing/coordinators/filters_applier.rb +2 -10
- data/lib/karafka/pro/processing/coordinators/virtual_offset_manager.rb +2 -10
- data/lib/karafka/pro/processing/executor.rb +2 -10
- data/lib/karafka/pro/processing/expansions_selector.rb +2 -10
- data/lib/karafka/pro/processing/filters/base.rb +2 -10
- data/lib/karafka/pro/processing/filters/delayer.rb +2 -10
- data/lib/karafka/pro/processing/filters/expirer.rb +2 -10
- data/lib/karafka/pro/processing/filters/inline_insights_delayer.rb +2 -10
- data/lib/karafka/pro/processing/filters/throttler.rb +2 -10
- data/lib/karafka/pro/processing/filters/virtual_limiter.rb +2 -10
- data/lib/karafka/pro/processing/jobs/consume_non_blocking.rb +2 -10
- data/lib/karafka/pro/processing/jobs/eofed_non_blocking.rb +2 -10
- data/lib/karafka/pro/processing/jobs/periodic.rb +2 -10
- data/lib/karafka/pro/processing/jobs/periodic_non_blocking.rb +2 -10
- data/lib/karafka/pro/processing/jobs/revoked_non_blocking.rb +2 -10
- data/lib/karafka/pro/processing/jobs_builder.rb +2 -10
- data/lib/karafka/pro/processing/jobs_queue.rb +2 -10
- data/lib/karafka/pro/processing/offset_metadata/consumer.rb +2 -10
- data/lib/karafka/pro/processing/offset_metadata/fetcher.rb +2 -10
- data/lib/karafka/pro/processing/offset_metadata/listener.rb +2 -10
- data/lib/karafka/pro/processing/partitioner.rb +2 -10
- data/lib/karafka/pro/processing/periodic_job/consumer.rb +2 -10
- data/lib/karafka/pro/processing/piping/consumer.rb +2 -10
- data/lib/karafka/pro/processing/schedulers/base.rb +2 -10
- data/lib/karafka/pro/processing/schedulers/default.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom.rb +3 -11
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_lrj_mom_vp.rb +3 -11
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/dlq_ftr_mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom.rb +3 -11
- data/lib/karafka/pro/processing/strategies/aj/dlq_lrj_mom_vp.rb +3 -11
- data/lib/karafka/pro/processing/strategies/aj/dlq_mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/dlq_mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/ftr_lrj_mom_vp.rb +3 -11
- data/lib/karafka/pro/processing/strategies/aj/ftr_mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/ftr_mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/lrj_mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/lrj_mom_vp.rb +3 -11
- data/lib/karafka/pro/processing/strategies/aj/mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/aj/mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/base.rb +2 -10
- data/lib/karafka/pro/processing/strategies/default.rb +55 -58
- data/lib/karafka/pro/processing/strategies/dlq/default.rb +5 -13
- data/lib/karafka/pro/processing/strategies/dlq/ftr.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj.rb +3 -11
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom.rb +3 -11
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/ftr_lrj_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/ftr_mom.rb +3 -11
- data/lib/karafka/pro/processing/strategies/dlq/ftr_mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/ftr_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/lrj.rb +3 -11
- data/lib/karafka/pro/processing/strategies/dlq/lrj_mom.rb +3 -11
- data/lib/karafka/pro/processing/strategies/dlq/lrj_mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/lrj_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/mom.rb +3 -11
- data/lib/karafka/pro/processing/strategies/dlq/mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/dlq/vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/ftr/default.rb +2 -10
- data/lib/karafka/pro/processing/strategies/ftr/vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/lrj/default.rb +3 -11
- data/lib/karafka/pro/processing/strategies/lrj/ftr.rb +3 -11
- data/lib/karafka/pro/processing/strategies/lrj/ftr_mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/lrj/ftr_mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/lrj/ftr_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/lrj/mom.rb +2 -10
- data/lib/karafka/pro/processing/strategies/lrj/mom_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/lrj/vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/mom/default.rb +2 -10
- data/lib/karafka/pro/processing/strategies/mom/ftr.rb +2 -10
- data/lib/karafka/pro/processing/strategies/mom/ftr_vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/mom/vp.rb +2 -10
- data/lib/karafka/pro/processing/strategies/vp/default.rb +2 -10
- data/lib/karafka/pro/processing/strategies.rb +2 -10
- data/lib/karafka/pro/processing/strategy_selector.rb +2 -10
- data/lib/karafka/pro/processing/subscription_groups_coordinator.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/consumer.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/contracts/config.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/contracts/task.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/deserializer.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/dispatcher.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/errors.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/executor.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/listener.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/matcher.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/schedule.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/serializer.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/setup/config.rb +2 -10
- data/lib/karafka/pro/recurring_tasks/task.rb +2 -10
- data/lib/karafka/pro/recurring_tasks.rb +2 -10
- data/lib/karafka/pro/routing/features/active_job/builder.rb +2 -10
- data/lib/karafka/pro/routing/features/active_job.rb +2 -10
- data/lib/karafka/pro/routing/features/adaptive_iterator/config.rb +2 -10
- data/lib/karafka/pro/routing/features/adaptive_iterator/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/adaptive_iterator/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/adaptive_iterator.rb +2 -10
- data/lib/karafka/pro/routing/features/base.rb +2 -10
- data/lib/karafka/pro/routing/features/dead_letter_queue/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/dead_letter_queue/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/dead_letter_queue.rb +2 -10
- data/lib/karafka/pro/routing/features/delaying/config.rb +2 -10
- data/lib/karafka/pro/routing/features/delaying/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/delaying/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/delaying.rb +2 -10
- data/lib/karafka/pro/routing/features/direct_assignments/config.rb +2 -10
- data/lib/karafka/pro/routing/features/direct_assignments/contracts/consumer_group.rb +2 -10
- data/lib/karafka/pro/routing/features/direct_assignments/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/direct_assignments/subscription_group.rb +2 -10
- data/lib/karafka/pro/routing/features/direct_assignments/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/direct_assignments.rb +2 -10
- data/lib/karafka/pro/routing/features/expiring/config.rb +2 -10
- data/lib/karafka/pro/routing/features/expiring/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/expiring/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/expiring.rb +2 -10
- data/lib/karafka/pro/routing/features/filtering/config.rb +2 -10
- data/lib/karafka/pro/routing/features/filtering/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/filtering/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/filtering.rb +2 -10
- data/lib/karafka/pro/routing/features/inline_insights/config.rb +2 -10
- data/lib/karafka/pro/routing/features/inline_insights/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/inline_insights/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/inline_insights.rb +2 -10
- data/lib/karafka/pro/routing/features/long_running_job/config.rb +2 -10
- data/lib/karafka/pro/routing/features/long_running_job/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/long_running_job/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/long_running_job.rb +2 -10
- data/lib/karafka/pro/routing/features/multiplexing/config.rb +2 -10
- data/lib/karafka/pro/routing/features/multiplexing/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/multiplexing/patches/contracts/consumer_group.rb +2 -10
- data/lib/karafka/pro/routing/features/multiplexing/proxy.rb +2 -10
- data/lib/karafka/pro/routing/features/multiplexing/subscription_group.rb +2 -10
- data/lib/karafka/pro/routing/features/multiplexing/subscription_groups_builder.rb +2 -10
- data/lib/karafka/pro/routing/features/multiplexing.rb +2 -10
- data/lib/karafka/pro/routing/features/non_blocking_job/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/non_blocking_job.rb +2 -10
- data/lib/karafka/pro/routing/features/offset_metadata/config.rb +2 -10
- data/lib/karafka/pro/routing/features/offset_metadata/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/offset_metadata/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/offset_metadata.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/builder.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/config.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/consumer_group.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/contracts/consumer_group.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/contracts/pattern.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/detector.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/pattern.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/patterns.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns/topics.rb +2 -10
- data/lib/karafka/pro/routing/features/patterns.rb +2 -10
- data/lib/karafka/pro/routing/features/pausing/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/pausing/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/pausing.rb +2 -10
- data/lib/karafka/pro/routing/features/periodic_job/config.rb +2 -10
- data/lib/karafka/pro/routing/features/periodic_job/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/periodic_job/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/periodic_job.rb +2 -10
- data/lib/karafka/pro/routing/features/recurring_tasks/builder.rb +2 -10
- data/lib/karafka/pro/routing/features/recurring_tasks/config.rb +2 -10
- data/lib/karafka/pro/routing/features/recurring_tasks/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/recurring_tasks/proxy.rb +2 -10
- data/lib/karafka/pro/routing/features/recurring_tasks/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/recurring_tasks.rb +2 -10
- data/lib/karafka/pro/routing/features/scheduled_messages/builder.rb +2 -10
- data/lib/karafka/pro/routing/features/scheduled_messages/config.rb +2 -10
- data/lib/karafka/pro/routing/features/scheduled_messages/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/scheduled_messages/proxy.rb +2 -10
- data/lib/karafka/pro/routing/features/scheduled_messages/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/scheduled_messages.rb +2 -10
- data/lib/karafka/pro/routing/features/swarm/config.rb +2 -10
- data/lib/karafka/pro/routing/features/swarm/contracts/routing.rb +2 -10
- data/lib/karafka/pro/routing/features/swarm/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/swarm/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/swarm.rb +2 -10
- data/lib/karafka/pro/routing/features/throttling/config.rb +2 -10
- data/lib/karafka/pro/routing/features/throttling/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/throttling/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/throttling.rb +2 -10
- data/lib/karafka/pro/routing/features/virtual_partitions/config.rb +2 -10
- data/lib/karafka/pro/routing/features/virtual_partitions/contracts/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/virtual_partitions/topic.rb +2 -10
- data/lib/karafka/pro/routing/features/virtual_partitions.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/consumer.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/contracts/config.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/contracts/message.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/daily_buffer.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/day.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/deserializers/headers.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/deserializers/payload.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/dispatcher.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/errors.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/max_epoch.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/proxy.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/schema_validator.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/serializer.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/setup/config.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/state.rb +2 -10
- data/lib/karafka/pro/scheduled_messages/tracker.rb +2 -10
- data/lib/karafka/pro/scheduled_messages.rb +2 -10
- data/lib/karafka/pro/swarm/liveness_listener.rb +2 -10
- data/lib/karafka/processing/strategies/aj_dlq_mom.rb +1 -1
- data/lib/karafka/processing/strategies/default.rb +6 -6
- data/lib/karafka/processing/strategies/dlq.rb +3 -3
- data/lib/karafka/processing/strategies/dlq_mom.rb +2 -2
- data/lib/karafka/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -2
- metadata.gz.sig +0 -0
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -52,7 +44,7 @@ module Karafka
|
|
52
44
|
elsif !revoked?
|
53
45
|
# no need to check for manual seek because AJ consumer is internal and
|
54
46
|
# fully controlled by us
|
55
|
-
seek(
|
47
|
+
seek(seek_offset, false)
|
56
48
|
resume
|
57
49
|
else
|
58
50
|
resume
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -44,7 +36,7 @@ module Karafka
|
|
44
36
|
|
45
37
|
# no need to check for manual seek because AJ consumer is internal and
|
46
38
|
# fully controlled by us
|
47
|
-
seek(
|
39
|
+
seek(seek_offset, false) unless revoked?
|
48
40
|
|
49
41
|
resume
|
50
42
|
else
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -48,7 +40,7 @@ module Karafka
|
|
48
40
|
mark_as_consumed(last_group_message) unless revoked?
|
49
41
|
# no need to check for manual seek because AJ consumer is internal and
|
50
42
|
# fully controlled by us
|
51
|
-
seek(
|
43
|
+
seek(seek_offset, false) unless revoked?
|
52
44
|
|
53
45
|
resume
|
54
46
|
else
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -48,7 +40,7 @@ module Karafka
|
|
48
40
|
elsif !revoked?
|
49
41
|
# no need to check for manual seek because AJ consumer is internal and
|
50
42
|
# fully controlled by us
|
51
|
-
seek(
|
43
|
+
seek(seek_offset, false)
|
52
44
|
resume
|
53
45
|
else
|
54
46
|
resume
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -51,7 +43,7 @@ module Karafka
|
|
51
43
|
|
52
44
|
# no need to check for manual seek because AJ consumer is internal and
|
53
45
|
# fully controlled by us
|
54
|
-
seek(
|
46
|
+
seek(seek_offset, false) unless revoked?
|
55
47
|
|
56
48
|
resume
|
57
49
|
else
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -62,9 +54,9 @@ module Karafka
|
|
62
54
|
else
|
63
55
|
# seek offset can be nil only in case `#seek` was invoked with offset reset request
|
64
56
|
# In case like this we ignore marking
|
65
|
-
return true if
|
57
|
+
return true if seek_offset.nil?
|
66
58
|
# Ignore earlier offsets than the one we already committed
|
67
|
-
return true if
|
59
|
+
return true if seek_offset > message.offset
|
68
60
|
return false if revoked?
|
69
61
|
|
70
62
|
# If we are not inside a transaction but this is a transactional topic, we mark with
|
@@ -77,7 +69,7 @@ module Karafka
|
|
77
69
|
|
78
70
|
return revoked? unless stored
|
79
71
|
|
80
|
-
|
72
|
+
self.seek_offset = message.offset + 1
|
81
73
|
end
|
82
74
|
|
83
75
|
true
|
@@ -99,9 +91,9 @@ module Karafka
|
|
99
91
|
else
|
100
92
|
# seek offset can be nil only in case `#seek` was invoked with offset reset request
|
101
93
|
# In case like this we ignore marking
|
102
|
-
return true if
|
94
|
+
return true if seek_offset.nil?
|
103
95
|
# Ignore earlier offsets than the one we already committed
|
104
|
-
return true if
|
96
|
+
return true if seek_offset > message.offset
|
105
97
|
return false if revoked?
|
106
98
|
|
107
99
|
# If we are not inside a transaction but this is a transactional topic, we mark with
|
@@ -114,7 +106,7 @@ module Karafka
|
|
114
106
|
|
115
107
|
return revoked? unless stored
|
116
108
|
|
117
|
-
|
109
|
+
self.seek_offset = message.offset + 1
|
118
110
|
end
|
119
111
|
|
120
112
|
true
|
@@ -143,52 +135,57 @@ module Karafka
|
|
143
135
|
# way, so the message producing aliases operate from within transactions and since the
|
144
136
|
# producer in transaction is locked, it will prevent other threads from using it.
|
145
137
|
def transaction(active_producer = producer)
|
146
|
-
default_producer =
|
147
|
-
|
138
|
+
default_producer = nil
|
139
|
+
transaction_started = nil
|
148
140
|
|
149
|
-
|
141
|
+
monitor.instrument('consumer.consuming.transaction', caller: self) do
|
142
|
+
default_producer = producer
|
143
|
+
self.producer = active_producer
|
150
144
|
|
151
|
-
|
152
|
-
raise Errors::TransactionAlreadyInitializedError if @_in_transaction
|
145
|
+
transaction_started = false
|
153
146
|
|
154
|
-
|
155
|
-
|
156
|
-
@_in_transaction = true
|
157
|
-
@_in_transaction_marked = false
|
147
|
+
# Prevent from nested transactions. It would not make any sense
|
148
|
+
raise Errors::TransactionAlreadyInitializedError if @_in_transaction
|
158
149
|
|
159
|
-
|
160
|
-
|
150
|
+
transaction_started = true
|
151
|
+
@_transaction_marked = []
|
152
|
+
@_in_transaction = true
|
153
|
+
@_in_transaction_marked = false
|
161
154
|
|
162
|
-
|
163
|
-
|
164
|
-
# producer only, this is not relevant.
|
165
|
-
raise Errors::AssignmentLostError if @_in_transaction_marked && revoked?
|
166
|
-
end
|
155
|
+
producer.transaction do
|
156
|
+
yield
|
167
157
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
# @note We never need to use the blocking `#mark_as_consumed!` here because the offset
|
174
|
-
# anyhow was already stored during the transaction
|
175
|
-
#
|
176
|
-
# @note Since the offset could have been already stored in Kafka (could have because
|
177
|
-
# you can have transactions without marking), we use the `@_in_transaction_marked`
|
178
|
-
# state to decide if we need to dispatch the offset via client at all
|
179
|
-
# (if post transaction, then we do not have to)
|
180
|
-
#
|
181
|
-
# @note In theory we could only keep reference to the most recent marking and reject
|
182
|
-
# others. We however do not do it for two reasons:
|
183
|
-
# - User may have non standard flow relying on some alternative order and we want to
|
184
|
-
# mimic this
|
185
|
-
# - Complex strategies like VPs can use this in VPs to mark in parallel without
|
186
|
-
# having to redefine the transactional flow completely
|
187
|
-
@_transaction_marked.each do |marking|
|
188
|
-
marking.pop ? mark_as_consumed(*marking) : mark_as_consumed!(*marking)
|
189
|
-
end
|
158
|
+
# Ensure this transaction is rolled back if we have lost the ownership of this
|
159
|
+
# transaction. We do it only for transactions that contain offset management as for
|
160
|
+
# producer only, this is not relevant.
|
161
|
+
raise Errors::AssignmentLostError if @_in_transaction_marked && revoked?
|
162
|
+
end
|
190
163
|
|
191
|
-
|
164
|
+
@_in_transaction = false
|
165
|
+
|
166
|
+
# This offset is already stored in transaction but we set it here anyhow because we
|
167
|
+
# want to make sure our internal in-memory state is aligned with the transaction
|
168
|
+
#
|
169
|
+
# @note We never need to use the blocking `#mark_as_consumed!` here because the
|
170
|
+
# offset anyhow was already stored during the transaction
|
171
|
+
#
|
172
|
+
# @note Since the offset could have been already stored in Kafka (could have because
|
173
|
+
# you can have transactions without marking), we use the `@_in_transaction_marked`
|
174
|
+
# state to decide if we need to dispatch the offset via client at all
|
175
|
+
# (if post transaction, then we do not have to)
|
176
|
+
#
|
177
|
+
# @note In theory we could only keep reference to the most recent marking and reject
|
178
|
+
# others. We however do not do it for two reasons:
|
179
|
+
# - User may have non standard flow relying on some alternative order and we want
|
180
|
+
# to mimic this
|
181
|
+
# - Complex strategies like VPs can use this in VPs to mark in parallel without
|
182
|
+
# having to redefine the transactional flow completely
|
183
|
+
@_transaction_marked.each do |marking|
|
184
|
+
marking.pop ? mark_as_consumed(*marking) : mark_as_consumed!(*marking)
|
185
|
+
end
|
186
|
+
|
187
|
+
true
|
188
|
+
end
|
192
189
|
ensure
|
193
190
|
self.producer = default_producer
|
194
191
|
|
@@ -254,15 +251,15 @@ module Karafka
|
|
254
251
|
def mark_in_memory(message)
|
255
252
|
# seek offset can be nil only in case `#seek` was invoked with offset reset request
|
256
253
|
# In case like this we ignore marking
|
257
|
-
return true if
|
254
|
+
return true if seek_offset.nil?
|
258
255
|
# Ignore earlier offsets than the one we already committed
|
259
|
-
return true if
|
256
|
+
return true if seek_offset > message.offset
|
260
257
|
return false if revoked?
|
261
258
|
|
262
259
|
# If we have already marked this successfully in a transaction that was running
|
263
260
|
# we should not mark it again with the client offset delegation but instead we should
|
264
261
|
# just align the in-memory state
|
265
|
-
|
262
|
+
self.seek_offset = message.offset + 1
|
266
263
|
|
267
264
|
true
|
268
265
|
end
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -90,7 +82,7 @@ module Karafka
|
|
90
82
|
# information if this message was from marked offset or figured out via mom flow
|
91
83
|
def find_skippable_message
|
92
84
|
skippable_message = messages.find do |msg|
|
93
|
-
coordinator.marked? && msg.offset ==
|
85
|
+
coordinator.marked? && msg.offset == seek_offset
|
94
86
|
end
|
95
87
|
|
96
88
|
# If we don't have the message matching the last comitted offset, it means that
|
@@ -139,7 +131,7 @@ module Karafka
|
|
139
131
|
if mark_after_dispatch?
|
140
132
|
mark_dispatched_to_dlq(skippable_message)
|
141
133
|
else
|
142
|
-
|
134
|
+
self.seek_offset = skippable_message.offset + 1
|
143
135
|
end
|
144
136
|
end
|
145
137
|
|
@@ -234,7 +226,7 @@ module Karafka
|
|
234
226
|
coordinator.pause_tracker.reset
|
235
227
|
|
236
228
|
# Always backoff after DLQ dispatch even on skip to prevent overloads on errors
|
237
|
-
pause(
|
229
|
+
pause(seek_offset, nil, false)
|
238
230
|
end
|
239
231
|
|
240
232
|
# Marks message that went to DLQ (if applicable) based on the requested method
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -48,7 +40,7 @@ module Karafka
|
|
48
40
|
if coordinator.filtered? && !revoked?
|
49
41
|
handle_post_filtering
|
50
42
|
elsif !revoked? && !coordinator.manual_seek?
|
51
|
-
seek(
|
43
|
+
seek(seek_offset, false)
|
52
44
|
resume
|
53
45
|
else
|
54
46
|
resume
|
@@ -1,15 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# All of the commercial components are present in the lib/karafka/pro directory of this
|
7
|
-
# repository and their usage requires commercial license agreement.
|
8
|
-
#
|
9
|
-
# Karafka has also commercial-friendly license, commercial support and commercial components.
|
10
|
-
#
|
11
|
-
# By sending a pull request to the pro components, you are agreeing to transfer the copyright of
|
12
|
-
# your code to Maciej Mensfeld.
|
3
|
+
# This code is part of Karafka Pro, a commercial component not licensed under LGPL.
|
4
|
+
# See LICENSE for details.
|
13
5
|
|
14
6
|
module Karafka
|
15
7
|
module Pro
|
@@ -58,7 +50,7 @@ module Karafka
|
|
58
50
|
if mark_after_dispatch?
|
59
51
|
mark_dispatched_to_dlq(skippable_message)
|
60
52
|
else
|
61
|
-
|
53
|
+
self.seek_offset = skippable_message.offset + 1
|
62
54
|
end
|
63
55
|
end
|
64
56
|
end
|