gems karafka 2.6.0.beta1
v2.6.0.beta1

7 hours ago
  • [Maintenance] Replace manual per-version Warning[:performance] / Warning[:deprecated] flag setup in specs with a dynamic Warning.categories-based approach that enables all non-experimental warning categories automatically, keeping spec warning configuration in sync with karafka-rdkafka.
  • [Enhancement] Replace per-partition query_watermark_offsets consumer calls in Admin::Topics#read_watermark_offsets with two batch list_offsets admin calls (:earliest and :latest), reducing N sequential consumer roundtrips to 2 admin roundtrips regardless of how many topics or partitions are queried. Replace per-partition query_watermark_offsets fallback in Admin::ConsumerGroups#seek (when a time-based offset resolves beyond the last message) with a single batch list_offsets call covering all affected partitions. Replace per-partition query_watermark_offsets loop in Pro::Iterator::TplBuilder#resolve_partitions_with_negative_offsets with one batched offsets_for_times(epoch) call for consumer metadata warm-up plus two batch admin list_offsets calls for LWM/HWM resolution, reducing N sequential calls to 3 total (Pro).
  • [Feature] Add Karafka::Admin.read_partition_offsets (and Admin::Topics#read_partition_offsets) to expose the rd_kafka_ListOffsets admin API. Allows querying partition offsets by spec (:earliest, :latest, :max_timestamp, or a timestamp in ms) without a consumer group. Accepts an optional isolation_level: keyword — pass Karafka::Admin::IsolationLevels::READ_COMMITTED to get the Last Stable Offset (LSO) instead of the high-watermark, giving accurate lag figures on transactionally-produced topics.
  • [Feature] Add Karafka::Admin::IsolationLevels module with READ_UNCOMMITTED and READ_COMMITTED constants. These wrap the underlying Rdkafka::Bindings integer constants so callers do not need to reference rdkafka internals directly.
  • [Feature] Introduce standalone Karafka::Declaratives subsystem (Declaratives::Topic, Declaratives::Repository, Declaratives::Builder) decoupled from routing. Topic declarations can now be defined via Karafka::App.declaratives.draw independently of routing blocks. The existing routing#config(partitions:, ...) DSL continues to work as a backwards-compatible bridge that populates the shared declaratives repository.
  • [Enhancement] CLI topic commands (create, delete, reset, repartition, align, migrate, plan) now read from Karafka::App.declaratives.topics instead of walking the routing tree. Topics declared via the standalone declaratives.draw DSL are now managed by all CLI commands without requiring a routing entry. The routing bridge sets bootstrap_servers on declarations for cluster filtering.
  • [Enhancement] Move consumer-group-specific Processing components (Coordinator, CoordinatorsBuffer, Executor, ExecutorsBuffer, Partitioner, ExpansionsSelector, InlineInsights) and Pro equivalents (including SubscriptionGroupsCoordinator, Collapser, AdaptiveIterator, PeriodicJob, ParallelSegments, VirtualPartitions, Filters, OffsetMetadata, Piping) under the ConsumerGroups namespace (internal). The config.processing.coordinator_class, executor_class, partitioner_class, and expansions_selector defaults are updated accordingly; user-provided classes are unaffected. Generic processing components (JobsQueue, Worker, WorkersPool, Schedulers::*, Jobs::Base) stay in their original locations.
  • [Enhancement] Move processing strategies (Karafka::Processing::Strategies::* and Karafka::Pro::Processing::Strategies::*) under the ConsumerGroups namespace (internal). Prepares the processing layer for parallel ShareGroups::Strategies once KIP-932 lands.
  • [Enhancement] Move Karafka::Processing::StrategySelector and Karafka::Pro::Processing::StrategySelector under the ConsumerGroups namespace (internal). The config.processing.strategy_selector default is updated accordingly; user-provided selectors are unaffected.
  • [Enhancement] Move Karafka::Connection::RebalanceManager to Karafka::Connection::ConsumerGroups::RebalanceManager (internal). Prepares the connection layer for a parallel ShareGroups namespace once KIP-932 lands.
  • [Enhancement] Move the rebalance librdkafka callback to Karafka::Instrumentation::Callbacks::ConsumerGroups::Rebalance (internal). Published event names (rebalance.*) and payload shape are unchanged.
  • [Enhancement] Move Karafka::Instrumentation::Callbacks::Error and Karafka::Instrumentation::Callbacks::Statistics to Karafka::Instrumentation::Callbacks::ConsumerGroups::Error and ConsumerGroups::Statistics (internal). Completes the callbacks layer namespacing — all consumer-group-specific librdkafka callbacks now live under Callbacks::ConsumerGroups. Published event names and payload shape are unchanged.
  • [Enhancement] Namespace consumer-group-specific processing job classes under Karafka::Processing::ConsumerGroups::Jobs (OSS: Consume, Eofed, Revoked, Shutdown, Idle) and Karafka::Pro::Processing::ConsumerGroups::Jobs (Pro: ConsumeNonBlocking, EofedNonBlocking, Periodic, PeriodicNonBlocking, RevokedNonBlocking). Only Jobs::Base stays under Karafka::Processing::Jobs as the generic base class. Internal move only — no public API changes; prepares the processing layer for parallel ShareGroups::Jobs (KIP-932).
  • [Enhancement] Move Karafka::Processing::JobsBuilder to Karafka::Processing::ConsumerGroups::JobsBuilder and Karafka::Pro::Processing::JobsBuilder to Karafka::Pro::Processing::ConsumerGroups::JobsBuilder (internal). The jobs builder only creates consumer-group-specific jobs; prepares the processing layer for a parallel ShareGroups::JobsBuilder once KIP-932 lands.
  • [Enhancement] Nest consumer-group-specific processing config settings (coordinator_class, errors_tracker_class, partitioner_class, strategy_selector, expansions_selector, executor_class, jobs_builder) under config.internal.processing.consumer_groups. Shared settings (jobs_queue_class, scheduler_class, worker_job_call_wrapper) remain at the config.internal.processing level. Prepares the config structure for a parallel config.internal.processing.share_groups sub-namespace once KIP-932 lands.
  • [Enhancement] Move OSS consumer-group-specific routing features (ActiveJob, DeadLetterQueue, Eofed, InlineInsights, ManualOffsetManagement) from Routing::Features to Routing::Features::ConsumerGroups (internal). Agnostic features (Declaratives, Deserializers) remain at the Routing::Features level. Prepares the routing layer for a parallel Routing::Features::ShareGroups namespace once KIP-932 lands.
  • [Enhancement] Move Pro consumer-group-specific routing features (ActiveJob, AdaptiveIterator, DeadLetterQueue, Delaying, DirectAssignments, InlineInsights, LongRunningJob, Multiplexing, NonBlockingJob, OffsetMetadata, ParallelSegments, Patterns, PeriodicJob, RecurringTasks, ScheduledMessages, Swarm, VirtualPartitions) from Pro::Routing::Features to Pro::Routing::Features::ConsumerGroups (internal). Agnostic features (Expiring, Filtering, Pausing, Throttling) remain at the Pro::Routing::Features level.
  • [Enhancement] Introduce polymorphic Routing::Topic#group and Routing::SubscriptionGroup#group accessors (with #consumer_group kept as a backwards-compatible alias), expose group_id alongside consumer_group_id in Routing::Topic#to_h, emit parallel group: / group_id: keys alongside consumer_group: / consumer_group_id: in rebalance.* payloads, and emit parallel group_id: alongside consumer_group_id: in error.occurred and statistics.emitted payloads (these callbacks only carry the group id, not the group object). Prepares routing for additional group types (e.g. KIP-932 share groups); legacy keys remain and will be retired in Karafka 3.0 once share groups land.
  • [Feature] Add Processing::WorkersPool with dynamic thread pool scaling via #scale, nil sentinel-based worker exit for downscaling, and worker.scaling.up/worker.scaling.down instrumentation events.
  • [Enhancement] Add per-partition generation tracking to AssignmentsTracker to distinguish first-time assignments from reassignments.
  • [Enhancement] Make liveness listeners fiber-safe.
  • [Fix] Include orphaned node detection in Pro swarm liveness listener.
  • [Fix] Report liveness on connection.listener.before_fetch_loop so nodes send an initial healthy report before the first consumption.
  • [Fix] Fire liveness events during wait_pinging so nodes continue reporting health status during shutdown with active LRJ jobs.
  • [Maintenance] Use namespaced topic naming format in all integration specs for consistent traceability.
  • [Fix] Fix DataCollector::SPEC_HASH producing non-deterministic hashes for pristine and poro specs by passing the original spec path via KARAFKA_SPEC_PATH env var.
  • [Fix] Fix swarm supervisor leaking reader pipe file descriptors on node restarts by closing the old reader before creating a new pipe in Node#start.
  • [Maintenance] Add bin/tests_topics_hashes script for looking up spec files by their topic name hash prefix.
  • [Change] Require karafka-rdkafka >= 0.27.1 to pick up the fix for poll_batch and poll_batch_nb raising RdkafkaError with only the integer error code, which discarded topic/partition/offset context from e.details and caused partition_eof handling to call @buffer.eof(nil, nil), resulting in a TopicNotFoundError crash.
  • [Fix] Raise InvalidLicenseTokenError when a manually-defined Karafka::License module is missing required methods (#token or #version) instead of silently skipping pro component loading, which previously caused confusing NameError exceptions later in the boot process.
  • [Enhancement] Bump swarm supervisor SHUTDOWN_GRACE_PERIOD from 1s to 15s to give forked nodes enough time to finish post-shutdown_timeout cleanup (at_exit handlers, librdkafka finalization, connection pool close) before the supervisor forcefully terminates them, especially on CI where sleep granularity and waitpid cost stretch each supervision loop iteration.
  • [Maintenance] Fix flaky pro/admin/recovery/coordinator_for_spec.rb by warming up the __consumer_offsets internal topic with a produce + seek_consumer_group and retrying the first Recovery.coordinator_for call with exponential backoff on MetadataError.

Don't miss a new karafka release

NewReleases is sending notifications on new releases.