karafka 2.0.27 → 2.0.28

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  # Karafka framework changelog
2
2
 
3
- ## 2.0.27 (2022-01-11)
3
+ ## 2.0.28 (2023-01-25)
4
+ - **[Feature]** Provide the ability to use Dead Letter Queue with Virtual Partitions.
5
+ - [Improvement] Collapse Virtual Partitions upon retryable error to a single partition. This allows dead letter queue to operate and mitigate issues arising from work virtualization. This removes uncertainties upon errors that can be retried and processed. Affects given topic partition virtualization only for multi-topic and mulit-partition parallelization. It also minimizes potential "flickering" where given data set has potentially many corrupted messages. The collapse will last until all the messages from the collective corrupted batch are processed. After that, virtualization will resume.
6
+ - [Improvement] Introduce `#collapsed?` consumer method available for consumers using Virtual Partitions.
7
+ - [Improvement] Allow for customization of DLQ dispatched message details in Pro (#1266) via the `#enhance_dlq_message` consumer method.
8
+ - [Improvement] Include `original_consumer_group` in the DLQ dispatched messages in Pro.
9
+ - [Improvement] Use Karafka `client_id` as kafka `client.id` value by default
10
+
11
+ ### Upgrade notes
12
+
13
+ If you want to continue to use `karafka` as default for kafka `client.id`, assign it manually:
14
+
15
+ ```ruby
16
+ class KarafkaApp < Karafka::App
17
+ setup do |config|
18
+ # Other settings...
19
+ config.kafka = {
20
+ 'client.id': 'karafka'
21
+ }
22
+ ```
23
+
24
+ ## 2.0.27 (2023-01-11)
4
25
  - Do not lock Ruby version in Karafka in favour of `karafka-core`.
5
26
  - Make sure `karafka-core` version is at least `2.0.9` to make sure we run `karafka-rdkafka`.
6
27
 
@@ -356,797 +377,8 @@ Karafka 2.0:
356
377
  - Introduces a `karafka-core` dependency that contains common code used across the ecosystem.
357
378
  - Contains updated [wiki](https://github.com/karafka/karafka/wiki) on everything I could think of.
358
379
 
359
- ### What's ahead
360
-
361
- Karafka 2.0 is just the beginning.
362
-
363
- There are several things in the plan already for 2.1 and beyond, including a web dashboard, at-rest encryption, transactions support, and more.
364
-
365
- ## 2.0.0.rc6 (2022-08-05)
366
- - Update licenser to use a gem based approach based on `karafka-license`.
367
- - Do not mark intermediate jobs as consumed when Karafka runs Enhanced Active Job with Virtual Partitions.
368
- - Improve development experience by adding fast cluster state changes refresh (#944)
369
- - Improve the license loading.
370
-
371
- ## 2.0.0.rc5 (2022-08-01)
372
- - Improve specs stability
373
- - Improve forceful shutdown
374
- - Add support for debug `TTIN` backtrace printing
375
- - Fix a case where logger listener would not intercept `warn` level
376
- - Require `rdkafka` >= `0.12`
377
- - Replace statistics decorator with the one from `karafka-core`
378
-
379
- ## 2.0.0.rc4 (2022-07-28)
380
- - Remove `dry-monitor`
381
- - Use `karafka-core`
382
- - Improve forceful shutdown resources finalization
383
- - Cache consumer client name
384
-
385
- ## 2.0.0.rc3 (2022-07-26)
386
- - Fix Pro partitioner hash function may not utilize all the threads (#907).
387
- - Improve virtual partitions messages distribution.
388
- - Add StatsD/DataDog optional monitoring listener + dashboard template.
389
- - Validate that Pro consumer is always used for Pro subscription.
390
- - Improve ActiveJob consumer shutdown behaviour.
391
- - Change default `max_wait_time` to 1 second.
392
- - Change default `max_messages` to 100 (#915).
393
- - Move logger listener polling reporting level to debug when no messages (#916).
394
- - Improve stability on aggressive rebalancing (multiple rebalances in a short period).
395
- - Improve specs stability.
396
- - Allow using `:key` and `:partition_key` for Enhanced Active Job partitioning.
397
-
398
- ## 2.0.0.rc2 (2022-07-19)
399
- - Fix `example_consumer.rb.erb` `#shutdown` and `#revoked` signatures to correct once.
400
- - Improve the install user experience (print status and created files).
401
- - Change default `max_wait_time` from 10s to 5s.
402
- - Remove direct dependency on `dry-configurable` in favour of a home-brew.
403
- - Remove direct dependency on `dry-validation` in favour of a home-brew.
404
-
405
- ## 2.0.0-rc1 (2022-07-08)
406
- - Extract consumption partitioner out of listener inline code.
407
- - Introduce virtual partitioner concept for parallel processing of data from a single topic partition.
408
- - Improve stability when there kafka internal errors occur while polling.
409
- - Fix a case where we would resume a LRJ partition upon rebalance where we would reclaim the partition while job was still running.
410
- - Do not revoke pauses for lost partitions. This will allow to un-pause reclaimed partitions when LRJ jobs are done.
411
- - Fail integrations by default (unless configured otherwise) if any errors occur during Karafka server execution.
412
-
413
- ## 2.0.0-beta5 (2022-07-05)
414
- - Always resume processing of a revoked partition upon assignment.
415
- - Improve specs stability.
416
- - Fix a case where revocation job would be executed on partition for which we never did any work.
417
- - Introduce a jobs group coordinator for easier jobs management.
418
- - Improve stability of resuming paused partitions that were revoked and re-assigned.
419
- - Optimize reaction time on partition ownership changes.
420
- - Fix a bug where despite setting long max wait time, we would return messages prior to it while not reaching the desired max messages count.
421
- - Add more integration specs related to polling limits.
422
- - Remove auto-detection of re-assigned partitions upon rebalance as for too fast rebalances it could not be accurate enough. It would also mess up in case of rebalances that would happen right after a `#seek` was issued for a partition.
423
- - Optimize the removal of pre-buffered lost partitions data.
424
- - Always run `#revoked` when rebalance with revocation happens.
425
- - Evict executors upon rebalance, to prevent race-conditions.
426
- - Align topics names for integration specs.
427
-
428
- ## 2.0.0-beta4 (2022-06-20)
429
- - Rename job internal api methods from `#prepare` to `#before_call` and from `#teardown` to `#after_call` to abstract away jobs execution from any type of executors and consumers logic
430
- - Remove ability of running `before_consume` and `after_consume` completely. Those should be for internal usage only.
431
- - Reorganize how Pro consumer and Pro AJ consumers inherit.
432
- - Require WaterDrop `2.3.1`.
433
- - Add more integration specs for rebalancing and max poll exceeded.
434
- - Move `revoked?` state from PRO to regular Karafka.
435
- - Use return value of `mark_as_consumed!` and `mark_as_consumed` as indicator of partition ownership + use it to switch the ownership state.
436
- - Do not remove rebalance manager upon client reset and recovery. This will allow us to keep the notion of lost partitions, so we can run revocation jobs for blocking jobs that exceeded the max poll interval.
437
- - Run revocation jobs upon reaching max poll interval for blocking jobs.
438
- - Early exit `poll` operation upon partition lost or max poll exceeded event.
439
- - Always reset consumer instances on timeout exceeded.
440
- - Wait for Kafka to create all the needed topics before running specs in CI.
441
-
442
- ## 2.0.0-beta3 (2022-06-14)
443
- - Jobs building responsibility extracted out of the listener code base.
444
- - Fix a case where specs supervisor would try to kill no longer running process (#868)
445
- - Fix an instable integration spec that could misbehave under load
446
- - Commit offsets prior to pausing partitions to ensure that the latest offset is always committed
447
- - Fix a case where consecutive CTRL+C (non-stop) would case an exception during forced shutdown
448
- - Add missing `consumer.prepared.error` into `LoggerListener`
449
- - Delegate partition resuming from the consumers to listeners threads.
450
- - Add support for Long-Running Jobs (LRJ) for ActiveJob [PRO]
451
- - Add support for Long-Running Jobs for consumers [PRO]
452
- - Allow `active_job_topic` to accept a block for extra topic related settings
453
- - Remove no longer needed logger threads
454
- - Auto-adapt number of processes for integration specs based on the number of CPUs
455
- - Introduce an integration spec runner that prints everything to stdout (better for development)
456
- - Introduce extra integration specs for various ActiveJob usage scenarios
457
- - Rename consumer method `#prepared` to `#prepare` to reflect better its use-case
458
- - For test and dev raise an error when expired license key is used (never for non dev)
459
- - Add worker related monitor events (`worker.process` and `worker.processed`)
460
- - Update `LoggerListener` to include more useful information about processing and polling messages
461
-
462
- ## 2.0.0-beta2 (2022-06-07)
463
- - Abstract away notion of topics groups (until now it was just an array)
464
- - Optimize how jobs queue is closed. Since we enqueue jobs only from the listeners, we can safely close jobs queue once listeners are done. By extracting this responsibility from listeners, we remove corner cases and race conditions. Note here: for non-blocking jobs we do wait for them to finish while running the `poll`. This ensures, that for async jobs that are long-living, we do not reach `max.poll.interval`.
465
- - `Shutdown` jobs are executed in workers to align all the jobs behaviours.
466
- - `Shutdown` jobs are always blocking.
467
- - Notion of `ListenersBatch` was introduced similar to `WorkersBatch` to abstract this concept.
468
- - Change default `shutdown_timeout` to be more than `max_wait_time` not to cause forced shutdown when no messages are being received from Kafka.
469
- - Abstract away scheduling of revocation and shutdown jobs for both default and pro schedulers
470
- - Introduce a second (internal) messages buffer to distinguish between raw messages buffer and karafka messages buffer
471
- - Move messages and their metadata remap process to the listener thread to allow for their inline usage
472
- - Change how we wait in the shutdown phase, so shutdown jobs can still use Kafka connection even if they run for a longer period of time. This will prevent us from being kicked out from the group early.
473
- - Introduce validation that ensures, that `shutdown_timeout` is more than `max_wait_time`. This will prevent users from ending up with a config that could lead to frequent forceful shutdowns.
474
-
475
- ## 2.0.0-beta1 (2022-05-22)
476
- - Update the jobs queue blocking engine and allow for non-blocking jobs execution
477
- - Provide `#prepared` hook that always runs before the fetching loop is unblocked
478
- - [Pro] Introduce performance tracker for scheduling optimizer
479
- - Provide ability to pause (`#pause`) and resume (`#resume`) given partitions from the consumers
480
- - Small integration specs refactoring + specs for pausing scenarios
481
-
482
- ## 2.0.0-alpha6 (2022-04-17)
483
- - Fix a bug, where upon missing boot file and Rails, railtie would fail with a generic exception (#818)
484
- - Fix an issue with parallel pristine specs colliding with each other during `bundle install` (#820)
485
- - Replace `consumer.consume` with `consumer.consumed` event to match the behaviour
486
- - Make sure, that offset committing happens before the `consumer.consumed` event is propagated
487
- - Fix for failing when not installed (just a dependency) (#817)
488
- - Evict messages from partitions that were lost upon rebalancing (#825)
489
- - Do **not** run `#revoked` on partitions that were lost and assigned back upon rebalancing (#825)
490
- - Remove potential duplicated that could occur upon rebalance with re-assigned partitions (#825)
491
- - Optimize integration test suite additional consumers shutdown process (#828)
492
- - Optimize messages eviction and duplicates removal on poll stopped due to lack of messages
493
- - Add static group membership integration spec
494
-
495
- ## 2.0.0-alpha5 (2022-04-03)
496
- - Rename StdoutListener to LoggerListener (#811)
497
-
498
- ## 2.0.0-alpha4 (2022-03-20)
499
- - Rails support without ActiveJob queue adapter usage (#805)
500
-
501
- ## 2.0.0-alpha3 (2022-03-16)
502
- - Restore 'app.initialized' state and add notification on it
503
- - Fix the installation flow for Rails and add integration tests for this scenario
504
- - Add more integration tests covering some edge cases
505
-
506
- ## 2.0.0-alpha2 (2022-02-19)
507
- - Require `kafka` keys to be symbols
508
- - [Pro] Added ActiveJob Pro adapter
509
- - Small updates to the license and docs
510
-
511
- ## 2.0.0-alpha1 (2022-01-30)
512
- - Change license to `LGPL-3.0`
513
- - [Pro] Introduce a Pro subscription
514
- - Switch from `ruby-kafka` to `librdkafka` as an underlying driver
515
- - Introduce fully automatic integration tests that go through the whole server lifecycle
516
- - Integrate WaterDrop tightly with autoconfiguration inheritance and an option to redefine it
517
- - Multi-threaded support for concurrent jobs consumption (when in separate topics and/or partitions)
518
- - Introduce subscriptions groups concept for better resources management
519
- - Remove completely all the callbacks in favour of finalizer method `#on_shutdown`
520
- - Provide `on_revoked` method for taking actions upon topic revoke
521
- - Remove single message consumption mode in favour of documentation on how to do it easily by yourself
522
- - Provide sync and async offset management with async preferred
523
- - Introduce seamless Ruby on Rails integration via `Rails::Railte`
524
- - Update `cli info` to reflect the `2.0` details
525
- - Remove responders in favour of WaterDrop `2.0` producer
526
- - Remove pidfiles support
527
- - Remove daemonization support
528
- - Stop validating `kafka` configuration beyond minimum as it is handled by `librdkafka`
529
- - Remove topics mappers concept
530
- - Reorganize monitoring to match new concepts
531
- - Notify on fatal worker processing errors
532
- - Rename `Karafka::Params::BatchMetadata` to `Karafka::Messages::BatchMetadata`
533
- - Rename `Karafka::Params::Params` to `Karafka::Messages::Message`
534
- - Rename `#params_batch` in consumers to `#messages`
535
- - Rename `Karafka::Params::Metadata` to `Karafka::Messages::Metadata`
536
- - Allow for processing work of multiple consumer groups by the same worker poll
537
- - Rename `Karafka::Fetcher` to `Karafka::Runner` and align notifications key names
538
- - Update install templates
539
- - `sidekiq-backend` is no longer supported
540
- - `testing` gem for RSpec has been updated
541
- - `WaterDrop` `2.1+` support
542
- - Simple routing style (`0.5`) now builds a single consumer group instead of one per topic
543
- - Example apps were updated
544
- - Hook for underlying statistics emitted from librdkafka have been added
545
- - Hook for underlying async errors emitted from librdkafka have been added
546
- - ActiveJob Rails adapter
547
- - Added benchmarks that can be used to profile Karafka
548
- - Standardize error hook for all error reporting
549
-
550
- ## 1.4.11 (2021-12-04)
551
- - Source code metadata url added to the gemspec
552
- - Gem bump
553
-
554
- ## 1.4.10 (2021-10-30)
555
- - update gems requirements in the gemspec (nijikon)
556
-
557
- ## 1.4.9 (2021-09-29)
558
- - fix `dry-configurable` deprecation warnings for default value as positional argument
559
-
560
- ## 1.4.8 (2021-09-08)
561
- - Allow 'rails' in Gemfile to enable rails-aware generator (rewritten)
562
-
563
- ## 1.4.7 (2021-09-04)
564
- - Update ruby-kafka to `1.4.0`
565
- - Support for `resolve_seed_brokers` option (with Azdaroth)
566
- - Set minimum `ruby-kafka` requirement to `1.3.0`
567
-
568
- ## 1.4.6 (2021-08-05)
569
- - #700 Fix Ruby 3 compatibility issues in Connection::Client#pause (MmKolodziej)
570
-
571
- ## 1.4.5 (2021-06-16)
572
- - Fixup logger checks for non-writeable logfile (ojab)
573
- - #689 - Update the stdout initialization message for framework initialization
574
-
575
- ## 1.4.4 (2021-04-19)
576
- - Remove Ruby 2.5 support and update minimum Ruby requirement to 2.6
577
- - Remove rake dependency
578
-
579
- ## 1.4.3 (2021-03-24)
580
- - Fixes for Ruby 3.0 compatibility
581
-
582
- ## 1.4.2 (2021-02-16)
583
- - Rescue Errno::EROFS in ensure_dir_exists (unasuke)
584
-
585
- ## 1.4.1 (2020-12-04)
586
- - Return non-zero exit code when printing usage
587
- - Add support for :assignment_strategy for consumers
588
-
589
- ## 1.4.0 (2020-09-05)
590
- - Rename `Karafka::Params::Metadata` to `Karafka::Params::BatchMetadata`
591
- - Rename consumer `#metadata` to `#batch_metadata`
592
- - Separate metadata (including Karafka native metadata) from the root of params (backwards compatibility preserved thanks to rabotyaga)
593
- - Remove metadata hash dependency
594
- - Remove params dependency on a hash in favour of PORO
595
- - Remove batch metadata dependency on a hash
596
- - Remove MultiJson in favour of JSON in the default deserializer
597
- - allow accessing all the metadata without accessing the payload
598
- - freeze params and underlying elements except for the mutable payload
599
- - provide access to raw payload after serialization
600
- - fixes a bug where a non-deserializable (error) params would be marked as deserialized after first unsuccessful deserialization attempt
601
- - fixes bug where karafka would mutate internal ruby-kafka state
602
- - fixes bug where topic name in metadata would not be mapped using topic mappers
603
- - simplifies the params and params batch API, before `#payload` usage, it won't be deserialized
604
- - removes the `#[]` API from params to prevent from accessing raw data in a different way than #raw_payload
605
- - makes the params batch operations consistent as params payload is deserialized only when accessed explicitly
606
-
607
- ## 1.3.7 (2020-08-11)
608
- - #599 - Allow metadata access without deserialization attempt (rabotyaga)
609
- - Sync with ruby-kafka `1.2.0` api
610
-
611
- ## 1.3.6 (2020-04-24)
612
- - #583 - Use Karafka.logger for CLI messages (prikha)
613
- - #582 - Cannot only define seed brokers in consumer groups
614
-
615
- ## 1.3.5 (2020-04-02)
616
- - #578 - ThreadError: can't be called from trap context patch
617
-
618
- ## 1.3.4 (2020-02-17)
619
- - `dry-configurable` upgrade (solnic)
620
- - Remove temporary `thor` patches that are no longer needed
621
-
622
- ## 1.3.3 (2019-12-23)
623
- - Require `delegate` to fix missing dependency in `ruby-kafka`
624
-
625
- ## 1.3.2 (2019-12-23)
626
- - #561 - Allow `thor` 1.0.x usage in Karafka
627
- - #567 - Ruby 2.7.0 support + unfreeze of a frozen string fix
628
-
629
- ## 1.3.1 (2019-11-11)
630
- - #545 - Makes sure the log directory exists when is possible (robertomiranda)
631
- - Ruby 2.6.5 support
632
- - #551 - add support for DSA keys
633
- - #549 - Missing directories after `karafka install` (nijikon)
634
-
635
- ## 1.3.0 (2019-09-09)
636
- - Drop support for Ruby 2.4
637
- - YARD docs tags cleanup
638
-
639
- ## 1.3.0.rc1 (2019-07-31)
640
- - Drop support for Kafka 0.10 in favor of native support for Kafka 0.11.
641
- - Update ruby-kafka to the 0.7 version
642
- - Support messages headers receiving
643
- - Message bus unification
644
- - Parser available in metadata
645
- - Cleanup towards moving to a non-global state app management
646
- - Drop Ruby 2.3 support
647
- - Support for Ruby 2.6.3
648
- - `Karafka::Loader` has been removed in favor of Zeitwerk
649
- - Schemas are now contracts
650
- - #393 - Reorganize responders - removed `multiple_usage` constrain
651
- - #388 - ssl_client_cert_chain sync
652
- - #300 - Store value in a value key and replace its content with parsed version - without root merge
653
- - #331 - Disallow building groups without topics
654
- - #340 - Instrumentation unification. Better and more consistent naming
655
- - #340 - Procline instrumentation for a nicer process name
656
- - #342 - Change default for `fetcher_max_queue_size` from `100` to `10` to lower max memory usage
657
- - #345 - Cleanup exceptions names
658
- - #341 - Split connection delegator into batch delegator and single_delegator
659
- - #351 - Rename `#retrieve!` to `#parse!` on params and `#parsed` to `parse!` on params batch.
660
- - #351 - Adds '#first' for params_batch that returns parsed first element from the params_batch object.
661
- - #360 - Single params consuming mode automatically parses data specs
662
- - #359 - Divide mark_as_consumed into mark_as_consumed and mark_as_consumed!
663
- - #356 - Provide a `#values` for params_batch to extract only values of objects from the params_batch
664
- - #363 - Too shallow ruby-kafka version lock
665
- - #354 - Expose consumer heartbeat
666
- - #377 - Remove the persistent setup in favor of persistence
667
- - #375 - Sidekiq Backend parser mismatch
668
- - #369 - Single consumer can support more than one topic
669
- - #288 - Drop dependency on `activesupport` gem
670
- - #371 - SASL over SSL
671
- - #392 - Move params redundant data to metadata
672
- - #335 - Metadata access from within the consumer
673
- - #402 - Delayed reconnection upon critical failures
674
- - #405 - `reconnect_timeout` value is now being validated
675
- - #437 - Specs ensuring that the `#437` won't occur in the `1.3` release
676
- - #426 - ssl client cert key password
677
- - #444 - add certificate and private key validation
678
- - #460 - Decouple responder "parser" (generator?) from topic.parser (benissimo)
679
- - #463 - Split parsers into serializers / deserializers
680
- - #473 - Support SASL OAuthBearer Authentication
681
- - #475 - Disallow subscribing to the same topic with multiple consumers
682
- - #485 - Setting shutdown_timeout to nil kills the app without waiting for anything
683
- - #487 - Make listeners as instances
684
- - #29 - Consumer class names must have the word "Consumer" in it in order to work (Sidekiq backend)
685
- - #491 - irb is missing for console to work
686
- - #502 - Karafka process hangs when sending multiple sigkills
687
- - #506 - ssl_verify_hostname sync
688
- - #483 - Upgrade dry-validation before releasing 1.3
689
- - #492 - Use Zeitwerk for code reload in development
690
- - #508 - Reset the consumers instances upon reconnecting to a cluster
691
- - [#530](https://github.com/karafka/karafka/pull/530) - expose ruby and ruby-kafka version
692
- - [534](https://github.com/karafka/karafka/pull/534) - Allow to use headers in the deserializer object
693
- - [#319](https://github.com/karafka/karafka/pull/328) - Support for exponential backoff in pause
694
-
695
- ## 1.2.11
696
- - [#470](https://github.com/karafka/karafka/issues/470) Karafka not working with dry-configurable 0.8
697
-
698
- ## 1.2.10
699
- - [#453](https://github.com/karafka/karafka/pull/453) require `Forwardable` module
700
-
701
- ## 1.2.9
702
- - Critical exceptions now will cause consumer to stop instead of retrying without a break
703
- - #412 - Fix dry-inflector dependency lock in gemspec
704
- - #414 - Backport to 1.2 the delayed retry upon failure
705
- - #437 - Raw message is no longer added to params after ParserError raised
706
-
707
- ## 1.2.8
708
- - #408 - Responder Topic Lookup Bug on Heroku
709
-
710
- ## 1.2.7
711
- - Unlock Ruby-kafka version with a warning
712
-
713
- ## 1.2.6
714
- - Lock WaterDrop to 1.2.3
715
- - Lock Ruby-Kafka to 0.6.x (support for 0.7 will be added in Karafka 1.3)
716
- - #382 - Full logging with AR, etc for development mode when there is Rails integration
717
-
718
- ## 1.2.5
719
- - #354 - Expose consumer heartbeat
720
- - #373 - Async producer not working properly with responders
721
-
722
- ## 1.2.4
723
- - #332 - Fetcher for max queue size
724
-
725
- ## 1.2.3
726
- - #313 - support PLAINTEXT and SSL for scheme
727
- - #288 - drop activesupport callbacks in favor of notifications
728
- - #320 - Pausing indefinitely with nil pause timeout doesn't work
729
- - #318 - Partition pausing doesn't work with custom topic mappers
730
- - Rename ConfigAdapter to ApiAdapter to better reflect what it does
731
- - #317 - Manual offset committing doesn't work with custom topic mappers
732
-
733
- ## 1.2.2
734
- - #312 - Broken for ActiveSupport 5.2.0
735
-
736
- ## 1.2.1
737
- - #304 - Unification of error instrumentation event details
738
- - #306 - Using file logger from within a trap context upon shutdown is impossible
739
-
740
- ## 1.2.0
741
- - Spec improvements
742
- - #260 - Specs missing randomization
743
- - #251 - Shutdown upon non responding (unreachable) cluster is not possible
744
- - #258 - Investigate lowering requirements on activesupport
745
- - #246 - Alias consumer#mark_as_consumed on controller
746
- - #259 - Allow forcing key/partition key on responders
747
- - #267 - Styling inconsistency
748
- - #242 - Support setting the max bytes to fetch per request
749
- - #247 - Support SCRAM once released
750
- - #271 - Provide an after_init option to pass a configuration block
751
- - #262 - Error in the monitor code for NewRelic
752
- - #241 - Performance metrics
753
- - #274 - Rename controllers to consumers
754
- - #184 - Seek to
755
- - #284 - Dynamic Params parent class
756
- - #275 - ssl_ca_certs_from_system
757
- - #296 - Instrument forceful exit with an error
758
- - Replaced some of the activesupport parts with dry-inflector
759
- - Lower ActiveSupport dependency
760
- - Remove configurators in favor of the after_init block configurator
761
- - Ruby 2.5.0 support
762
- - Renamed Karafka::Connection::Processor to Karafka::Connection::Delegator to match incoming naming conventions
763
- - Renamed Karafka::Connection::Consumer to Karafka::Connection::Client due to #274
764
- - Removed HashWithIndifferentAccess in favor of a regular hash
765
- - JSON parsing defaults now to string keys
766
- - Lower memory usage due to less params data internal details
767
- - Support multiple ```after_init``` blocks in favor of a single one
768
- - Renamed ```received_at``` to ```receive_time``` to follow ruby-kafka and WaterDrop conventions
769
- - Adjust internal setup to easier map Ruby-Kafka config changes
770
- - System callbacks reorganization
771
- - Added ```before_fetch_loop``` configuration block for early client usage (```#seek```, etc)
772
- - Renamed ```after_fetched``` to ```after_fetch``` to normalize the naming convention
773
- - Instrumentation on a connection delegator level
774
- - Added ```params_batch#last``` method to retrieve last element after unparsing
775
- - All params keys are now strings
776
-
777
- ## 1.1.2
778
- - #256 - Default kafka.seed_brokers configuration is created in invalid format
779
-
780
- ## 1.1.1
781
- - #253 - Allow providing a global per app parser in config settings
782
-
783
- ## 1.1.0
784
- - Gem bump
785
- - Switch from Celluloid to native Thread management
786
- - Improved shutdown process
787
- - Introduced optional fetch callbacks and moved current the ```after_received``` there as well
788
- - Karafka will raise Errors::InvalidPauseTimeout exception when trying to pause but timeout set to 0
789
- - Allow float for timeouts and other time based second settings
790
- - Renamed MessagesProcessor to Processor and MessagesConsumer to Consumer - we don't process and don't consumer anything else so it was pointless to keep this "namespace"
791
- - #232 - Remove unused ActiveSupport require
792
- - #214 - Expose consumer on a controller layer
793
- - #193 - Process shutdown callbacks
794
- - Fixed accessibility of ```#params_batch``` from the outside of the controller
795
- - connection_pool config options are no longer required
796
- - celluloid config options are no longer required
797
- - ```#perform``` is now renamed to ```#consume``` with warning level on using the old one (deprecated)
798
- - #235 - Rename perform to consume
799
- - Upgrade to ruby-kafka 0.5
800
- - Due to redesign of Waterdrop concurrency setting is no longer needed
801
- - #236 - Manual offset management
802
- - WaterDrop 1.0.0 support with async
803
- - Renamed ```batch_consuming``` option to ```batch_fetching``` as it is not a consumption (with processing) but a process of fetching messages from Kafka. The messages is considered consumed, when it is processed.
804
- - Renamed ```batch_processing``` to ```batch_consuming``` to resemble Kafka concept of consuming messages.
805
- - Renamed ```after_received``` to ```after_fetched``` to normalize the naming conventions.
806
- - Responders support the per topic ```async``` option.
807
-
808
- ## 1.0.1
809
- - #210 - LoadError: cannot load such file -- [...]/karafka.rb
810
- - Ruby 2.4.2 as a default (+travis integration)
811
- - JRuby upgrade
812
- - Expanded persistence layer (moved to a namespace for easier future development)
813
- - #213 - Misleading error when non-existing dependency is required
814
- - #212 - Make params react to #topic, #partition, #offset
815
- - #215 - Consumer group route dynamic options are ignored
816
- - #217 - check RUBY_ENGINE constant if RUBY_VERSION is missing (#217)
817
- - #218 - add configuration setting to control Celluloid's shutdown timeout
818
- - Renamed Karafka::Routing::Mapper to Karafka::Routing::TopicMapper to match naming conventions
819
- - #219 - Allow explicit consumer group names, without prefixes
820
- - Fix to early removed pid upon shutdown of demonized process
821
- - max_wait_time updated to match https://github.com/zendesk/ruby-kafka/issues/433
822
- - #230 - Better uri validation for seed brokers (incompatibility as the kafka:// or kafka+ssl:// is required)
823
- - Small internal docs fixes
824
- - Dry::Validation::MissingMessageError: message for broker_schema? was not found
825
- - #238 - warning: already initialized constant Karafka::Schemas::URI_SCHEMES
826
-
827
- ## 1.0.0
828
-
829
- ### Closed issues:
830
-
831
- - #103 - Env for logger is loaded 2 early (on gem load not on app init)
832
- - #142 - Possibility to better control Kafka consumers (consumer groups management)
833
- - #150 - Add support for start_from_beginning on a per topic basis
834
- - #154 - Support for min_bytes and max_wait_time on messages consuming
835
- - #160 - Reorganize settings to better resemble ruby-kafka requirements
836
- - #164 - If we decide to have configuration per topic, topic uniqueness should be removed
837
- - #165 - Router validator
838
- - #166 - Params and route reorganization (new API)
839
- - #167 - Remove Sidekiq UI from Karafka
840
- - #168 - Introduce unique IDs of routes
841
- - #171 - Add kafka message metadata to params
842
- - #176 - Transform Karafka::Connection::Consumer into a module
843
- - #177 - Monitor not reacting when kafka killed with -9
844
- - #175 - Allow single consumer to subscribe to multiple topics
845
- - #178 - Remove parsing failover when cannot unparse data
846
- - #174 - Extended config validation
847
- - ~~#180 - Switch from JSON parser to yajl-ruby~~
848
- - #181 - When responder is defined and not used due to ```respond_with``` not being triggered in the perform, it won't raise an exception.
849
- - #188 - Rename name in config to client id
850
- - #186 - Support ruby-kafka ```ssl_ca_cert_file_path``` config
851
- - #189 - karafka console does not preserve history on exit
852
- - #191 - Karafka 0.6.0rc1 does not work with jruby / now it does :-)
853
- - Switch to multi json so everyone can use their favourite JSON parser
854
- - Added jruby support in general and in Travis
855
- - #196 - Topic mapper does not map topics when subscribing thanks to @webandtech
856
- - #96 - Karafka server - possibility to run it only for a certain topics
857
- - ~~karafka worker cli option is removed (please use sidekiq directly)~~ - restored, bad idea
858
- - (optional) pausing upon processing failures ```pause_timeout```
859
- - Karafka console main process no longer intercepts irb errors
860
- - Wiki updates
861
- - #204 - Long running controllers
862
- - Better internal API to handle multiple usage cases using ```Karafka::Controllers::Includer```
863
- - #207 - Rename before_enqueued to after_received
864
- - #147 - De-attach Karafka from Sidekiq by extracting Sidekiq backend
865
-
866
- ### New features and improvements
867
-
868
- - batch processing thanks to ```#batch_consuming``` flag and ```#params_batch``` on controllers
869
- - ```#topic``` method on an controller instance to make a clear distinction in between params and route details
870
- - Changed routing model (still compatible with 0.5) to allow better resources management
871
- - Lower memory requirements due to object creation limitation (2-3 times less objects on each new message)
872
- - Introduced the ```#batch_consuming``` config flag (config for #126) that can be set per each consumer_group
873
- - Added support for partition, offset and partition key in the params hash
874
- - ```name``` option in config renamed to ```client_id```
875
- - Long running controllers with ```persistent``` flag on a topic config level, to make controller instances persistent between messages batches (single controller instance per topic per partition no per messages batch) - turned on by default
876
-
877
- ### Incompatibilities
878
-
879
- - Default boot file is renamed from app.rb to karafka.rb
880
- - Removed worker glass as dependency (now and independent gem)
881
- - ```kafka.hosts``` option renamed to ```kafka.seed_brokers``` - you don't need to provide all the hosts to work with Kafka
882
- - ```start_from_beginning``` moved into kafka scope (```kafka.start_from_beginning```)
883
- - Router no longer checks for route uniqueness - now you can define same routes for multiple kafkas and do a lot of crazy stuff, so it's your responsibility to check uniqueness
884
- - Change in the way we identify topics in between Karafka and Sidekiq workers. If you upgrade, please make sure, all the jobs scheduled in Sidekiq are finished before the upgrade.
885
- - ```batch_mode``` renamed to ```batch_fetching```
886
- - Renamed content to value to better resemble ruby-kafka internal messages naming convention
887
- - When having a responder with ```required``` topics and not using ```#respond_with``` at all, it will raise an exception
888
- - Renamed ```inline_mode``` to ```inline_processing``` to resemble other settings conventions
889
- - Renamed ```inline_processing``` to ```backend``` to reach 1.0 future compatibility
890
- - Single controller **needs** to be used for a single topic consumption
891
- - Renamed ```before_enqueue``` to ```after_received``` to better resemble internal logic, since for inline backend, there is no enqueue.
892
- - Due to the level on which topic and controller are related (class level), the dynamic worker selection is no longer available.
893
- - Renamed params #retrieve to params #retrieve! to better reflect what it does
894
-
895
- ### Other changes
896
- - PolishGeeksDevTools removed (in favour of Coditsu)
897
- - Waaaaaay better code quality thanks to switching from dev tools to Coditsu
898
- - Gem bump
899
- - Cleaner internal API
900
- - SRP
901
- - Better settings proxying and management between ruby-kafka and karafka
902
- - All internal validations are now powered by dry-validation
903
- - Better naming conventions to reflect Kafka reality
904
- - Removed Karafka::Connection::Message in favour of direct message details extraction from Kafka::FetchedMessage
905
-
906
- ## 0.5.0.3
907
- - #132 - When Kafka is gone, should reconnect after a time period
908
- - #136 - new ruby-kafka version + other gem bumps
909
- - ruby-kafka update
910
- - #135 - NonMatchingRouteError - better error description in the code
911
- - #140 - Move Capistrano Karafka to a different specific gem
912
- - #110 - Add call method on a responder class to alias instance build and call
913
- - #76 - Configs validator
914
- - #138 - Possibility to have no worker class defined if inline_mode is being used
915
- - #145 - Topic Mapper
916
- - Ruby update to 2.4.1
917
- - Gem bump x2
918
- - #158 - Update docs section on heroku usage
919
- - #150 - Add support for start_from_beginning on a per topic basis
920
- - #148 - Lower Karafka Sidekiq dependency
921
- - Allow karafka root to be specified from ENV
922
- - Handle SIGTERM as a shutdown command for kafka server to support Heroku deployment
923
-
924
- ## 0.5.0.2
925
- - Gems update x3
926
- - Default Ruby set to 2.3.3
927
- - ~~Default Ruby set to 2.4.0~~
928
- - Readme updates to match bug fixes and resolved issues
929
- - #95 - Allow options into responder
930
- - #98 - Use parser when responding on a topic
931
- - #114 - Option to configure waterdrop connection pool timeout and concurrency
932
- - #118 - Added dot in topic validation format
933
- - #119 - add support for authentication using SSL
934
- - #121 - JSON as a default for standalone responders usage
935
- - #122 - Allow on capistrano role customization
936
- - #125 - Add support to batch incoming messages
937
- - #130 - start_from_beginning flag on routes and default
938
- - #128 - Monitor caller_label not working with super on inheritance
939
- - Renamed *inline* to *inline_mode* to stay consistent with flags that change the way karafka works (#125)
940
- - Dry-configurable bump to 0.5 with fixed proc value evaluation on retrieve patch (internal change)
941
-
942
- ## 0.5.0.1
943
- - Fixed inconsistency in responders non-required topic definition. Now only required: false available
944
- - #101 - Responders fail when multiple_usage true and required false
945
- - fix error on startup from waterdrop #102
946
- - Waterdrop 0.3.2.1 with kafka.hosts instead of kafka_hosts
947
- - #105 - Karafka::Monitor#caller_label not working with inherited monitors
948
- - #99 - Standalone mode (without Sidekiq)
949
- - #97 - Buffer responders single topics before send (pre-validation)
950
- - Better control over consumer thanks to additional config options
951
- - #111 - Dynamic worker assignment based on the income params
952
- - Long shutdown time fix
953
-
954
- ## 0.5.0
955
- - Removed Zookeeper totally as dependency
956
- - Better group and partition rebalancing
957
- - Automatic thread management (no need for tuning) - each topic is a separate actor/thread
958
- - Moved from Poseidon into Ruby-Kafka
959
- - No more max_concurrency setting
960
- - After you define your App class and routes (and everything else) you need to add execute App.boot!
961
- - Manual consuming is no longer available (no more karafka consume command)
962
- - Karafka topics CLI is no longer available. No Zookeeper - no global topic discovery
963
- - Dropped ZK as dependency
964
- - karafka info command no longer prints details about Zookeeper
965
- - Better shutdown
966
- - No more autodiscovery via Zookeeper - instead, the whole cluster will be discovered directly from Kafka
967
- - No more support for Kafka 0.8
968
- - Support for Kafka 0.9
969
- - No more need for ActorCluster, since now we have a single thread (and Kafka connection) per topic
970
- - Ruby 2.2.* support dropped
971
- - Using App name as a Kafka client_id
972
- - Automatic Capistrano integration
973
- - Responders support for handling better responses pipe-lining and better responses flow description and design (see README for more details)
974
- - Gem bump
975
- - Readme updates
976
- - karafka flow CLI command for printing the application flow
977
- - Some internal refactoring
978
-
979
- ## 0.4.2
980
- - #87 - Re-consume mode with crone for better Rails/Rack integration
981
- - Moved Karafka server related stuff into separate Karafka::Server class
982
- - Renamed Karafka::Runner into Karafka::Fetcher
983
- - Gem bump
984
- - Added chroot option to Zookeeper options
985
- - Moved BROKERS_PATH into config from constant
986
- - Added Karafka consume CLI action for a short running single consumption round
987
- - Small fixes to close broken connections
988
- - Readme updates
989
-
990
- ## 0.4.1
991
- - Explicit throw(:abort) required to halt before_enqueue (like in Rails 5)
992
- - #61 - autodiscovery of Kafka brokers based on Zookeeper data
993
- - #63 - Graceful shutdown with current offset state during data processing
994
- - #65 - Example of NewRelic monitor is outdated
995
- - #71 - Setup should be executed after user code is loaded
996
- - Gem bump x3
997
- - Rubocop remarks
998
- - worker_timeout config option has been removed. It now needs to be defined manually by the framework user because WorkerGlass::Timeout can be disabled and we cannot use Karafka settings on a class level to initialize user code stuff
999
- - Moved setup logic under setup/Setup namespace
1000
- - Better defaults handling
1001
- - #75 - Kafka and Zookeeper options as a hash
1002
- - #82 - Karafka autodiscovery fails upon caching of configs
1003
- - #81 - Switch config management to dry configurable
1004
- - Version fix
1005
- - Dropped support for Ruby 2.1.*
1006
- - Ruby bump to 2.3.1
1007
-
1008
- ## 0.4.0
1009
- - Added WaterDrop gem with default configuration
1010
- - Refactoring of config logic to simplify adding new dependencies that need to be configured based on #setup data
1011
- - Gem bump
1012
- - Readme updates
1013
- - Renamed cluster to actor_cluster for method names
1014
- - Replaced SidekiqGlass with generic WorkerGlass lib
1015
- - Application bootstrap in app.rb no longer required
1016
- - Karafka.boot needs to be executed after all the application files are loaded (template updated)
1017
- - Small loader refactor (no API changes)
1018
- - Ruby 2.3.0 support (default)
1019
- - No more rake tasks
1020
- - Karafka CLI instead of rake tasks
1021
- - Worker cli command allows passing additional options directly to Sidekiq
1022
- - Renamed concurrency to max_concurrency - it describes better what happens - Karafka will use this number of threads only when required
1023
- - Added wait_timeout that allows us to tune how long should we wait on a single socket connection (single topic) for new messages before going to next one (this applies to each thread separately)
1024
- - Rubocop remarks
1025
- - Removed Sinatra and Puma dependencies
1026
- - Karafka Cli internal reorganization
1027
- - Karafka Cli routes task
1028
- - #37 - warn log for failed parsing of a message
1029
- - #43 - wrong constant name
1030
- - #44 - Method name conflict
1031
- - #48 - Cannot load such file -- celluloid/current
1032
- - #46 - Loading application
1033
- - #45 - Set up monitor in config
1034
- - #47 - rake karafka:run uses app.rb only
1035
- - #53 - README update with Sinatra/Rails integration description
1036
- - #41 - New Routing engine
1037
- - #54 - Move Karafka::Workers::BaseWorker to Karafka::BaseWorker
1038
- - #55 - ApplicationController and ApplicationWorker
1039
-
1040
- ## 0.3.2
1041
- - Karafka::Params::Params lazy load merge keys with string/symbol names priorities fix
1042
-
1043
- ## 0.3.1
1044
- - Renamed Karafka::Monitor to Karafka::Process to represent a Karafka process wrapper
1045
- - Added Karafka::Monitoring that allows to add custom logging and monitoring with external libraries and systems
1046
- - Moved logging functionality into Karafka::Monitoring default monitoring
1047
- - Added possibility to provide own monitoring as long as in responds to #notice and #notice_error
1048
- - Standardized logging format for all logs
1049
-
1050
- ## 0.3.0
1051
- - Switched from custom ParserError for each parser to general catching of Karafka::Errors::ParseError and its descendants
1052
- - Gem bump
1053
- - Fixed #32 - now when using custom workers that does not inherit from Karafka::BaseWorker perform method is not required. Using custom workers means that the logic that would normally lie under #perform, needs to be executed directly from the worker.
1054
- - Fixed #31 - Technically didn't fix because this is how Sidekiq is meant to work, but provided possibility to assign custom interchangers that allow to bypass JSON encoding issues by converting data that goes to Redis to a required format (and parsing it back when it is fetched)
1055
- - Added full parameters lazy load - content is no longer loaded during #perform_async if params are not used in before_enqueue
1056
- - No more namespaces for Redis by default (use separate DBs)
1057
-
1058
- ## 0.1.21
1059
- - Sidekiq 4.0.1 bump
1060
- - Gem bump
1061
- - Added direct celluloid requirement to Karafka (removed from Sidekiq)
1062
-
1063
- ## 0.1.19
1064
- - Internal call - schedule naming change
1065
- - Enqueue to perform_async naming in controller to follow Sidekiq naming convention
1066
- - Gem bump
1067
-
1068
- ## 0.1.18
1069
- - Changed Redis configuration options into a single hash that is directly passed to Redis setup for Sidekiq
1070
- - Added config.ru to provide a Sidekiq web UI (see README for more details)
1071
-
1072
- ## 0.1.17
1073
- - Changed Karafka::Connection::Cluster tp Karafka::Connection::ActorCluster to distinguish between a single thread actor cluster for multiple topic connection and a future feature that will allow process clusterization.
1074
- - Add an ability to use user-defined parsers for a messages
1075
- - Lazy load params for before callbacks
1076
- - Automatic loading/initializing all workers classes during startup (so Sidekiq won't fail with unknown workers exception)
1077
- - Params are now private to controller
1078
- - Added bootstrap method to app.rb
1079
-
1080
- ## 0.1.16
1081
- - Cluster level error catching for all exceptions so actor is not killer
1082
- - Cluster level error logging
1083
- - Listener refactoring (QueueConsumer extracted)
1084
- - Karafka::Connection::QueueConsumer to wrap around fetching logic - technically we could replace Kafka with any other messaging engine as long as we preserve the same API
1085
- - Added debug env for debugging purpose in applications
1086
-
1087
- ## 0.1.15
1088
- - Fixed max_wait_ms vs socket_timeout_ms issue
1089
- - Fixed closing queue connection after Poseidon::Errors::ProtocolError failure
1090
- - Fixed wrong logging file selection based on env
1091
- - Extracted Karafka::Connection::QueueConsumer object to wrap around queue connection
1092
-
1093
- ## 0.1.14
1094
- - Rake tasks for listing all the topics on Kafka server (rake kafka:topics)
1095
-
1096
- ## 0.1.13
1097
- - Ability to assign custom workers and use them bypassing Karafka::BaseWorker (or its descendants)
1098
- - Gem bump
1099
-
1100
- ## 0.1.12
1101
- - All internal errors went to Karafka::Errors namespace
1102
-
1103
- ## 0.1.11
1104
- - Rescuing all the "before Sidekiq" processing so errors won't affect other incoming messages
1105
- - Fixed dying actors after connection error
1106
- - Added a new app status - "initializing"
1107
- - Karafka::Status model cleanup
1108
-
1109
- ## 0.1.10
1110
- - Added possibility to specify redis namespace in configuration (failover to app name)
1111
- - Renamed redis_host to redis_url in configuration
1112
-
1113
- ## 0.1.9
1114
- - Added worker logger
1115
-
1116
- ## 0.1.8
1117
- - Dropped local env support in favour of [Envlogic](https://github.com/karafka/envlogic) - no changes in API
1118
-
1119
- ## 0.1.7
1120
- - Karafka option for Redis hosts (not localhost only)
1121
-
1122
- ## 0.1.6
1123
- - Added better concurency by clusterization of listeners
1124
- - Added graceful shutdown
1125
- - Added concurency that allows to handle bigger applications with celluloid
1126
- - Karafka controllers no longer require group to be defined (created based on the topic and app name)
1127
- - Karafka controllers no longer require topic to be defined (created based on the controller name)
1128
- - Readme updates
1129
-
1130
- ## 0.1.5
1131
- - Celluloid support for listeners
1132
- - Multi target logging (STDOUT and file)
1133
-
1134
- ## 0.1.4
1135
- - Renamed events to messages to follow Apache Kafka naming convention
1136
-
1137
- ## 0.1.3
1138
- - Karafka::App.logger moved to Karafka.logger
1139
- - README updates (Usage section was added)
1140
-
1141
- ## 0.1.2
1142
- - Logging to log/environment.log
1143
- - Karafka::Runner
1144
-
1145
- ## 0.1.1
1146
- - README updates
1147
- - Rake tasks updates
1148
- - Rake installation task
1149
- - Changelog file added
1150
-
1151
- ## 0.1.0
1152
- - Initial framework code
380
+ ## Older releases
381
+
382
+ This changelog tracks Karafka `2.0` and higher changes.
383
+
384
+ If you are looking for changes in the unsupported releases, we recommend checking the [`1.4`](https://github.com/karafka/karafka/blob/1.4/CHANGELOG.md) branch of the Karafka repository.