- TODO: Replace this bullet point with an actual description of a change.
- Added a new configuration (
avro_deserializer_parse_datetimes) which allows to configure the default Apache Avro deserializer to automatically parse date/time/datetime's from deeply nested strings (disabled by default for compatibility) (#76)
- Restored non-buffered (
$stdout.sync = true) logging to stdout (#75) - Added a section for topic auto-creation on the upgrading guide (#75)
- Updated the kafka-playground (#74)
Breaking changes: (#73)
-
Upgraded
karafkafrom~> 1.4to~> 2.5— now powered by librdkafka instead of ruby-kafka. Consumer groups are now shared (one for all topics instead of one per topic). Batch fetching is always on; tunemax_wait_time/max_messagesfor latency vs throughput. SeeUPGRADING.mdfor details. -
Upgraded
waterdropfrom~> 1.4to~> 2.8— all time-related config values are now in milliseconds. The Rimless producer helpers (Rimless.messageetc.) remain unchanged. -
Upgraded
avro_turffrom~> 0.11.0to~> 1.20 -
Switched from Sidekiq to ActiveJob for consumer job processing. The
karafka-sidekiq-backendgem is no longer used. -
Renamed constants (old → new):
Rimless::BaseConsumer→Rimless::Consumer::BaseRimless::ConsumerApp→Rimless::Consumer::AppRimless::ConsumerJob→Rimless::Consumer::JobRimless::Karafka::AvroDeserializer→Rimless::Consumer::AvroDeserializer
-
Removed constants:
Rimless::Karafka::Base64Interchanger(no longer needed)Rimless::Karafka::PassthroughMapper(mappers removed in Karafka 2)
-
Anonymous consumer classes are no longer supported. Because Karafka is no longer loaded within the ActiveJob worker process, consumer class names must be serializable (via
constantize). Rewrite anonymous consumers as named classes. SeeUPGRADING.mdfor details. -
Each Kafka message in a batch is now individually marked as consumed after being enqueued to ActiveJob (
mark_as_consumed). This may differ from previouskarafka-sidekiq-backendbehavior depending on your Karafka offset management configuration. SeeUPGRADING.mdfor details. -
KAFKA_BROKERSformat changed — protocol prefix (kafka://) is no longer required. Use plainhost:portCSV (e.g.your.domain:9092,host:port). The oldkafka://format is still accepted for backwards compatibility. -
Consumer boot flow changed:
- Remove
.boot!from the end ofRimless.consumer.topics(...)inkarafka.rb - Remove
WaterDrop.setupandWaterDrop::Instrumentation::LoggerListenersubscriptions fromkarafka.rb
- Remove
New configuration options:
config.job_bridge_class— custom job bridge for Kafka → ActiveJobconfig.consumer_job_class— custom consumer job classconfig.consumer_logger_listener— customize Karafka logging listenerconfig.avro_deserializer_class— custom Apache Avro deserializerconfig.avro_configure— fully customize theAvroTurf::Messaginginstanceconfig.producer_configure— fully customize theWaterDrop::Producerinstanceconfig.consumer_configure— fully customize theKarafka::Appinstance
Testing changes:
- Replace
#karafka_consumer_forwith#kafka_consumer_forin specs - Replace
#publish_for_karafkawithkarafka.producein specs
See UPGRADING.md for a complete migration guide.
- Dropped 3rd-level gem dependencies which are not directly used by this gem (#72)
- Corrected some RuboCop glitches (#71)
- Added the
ostructgem (#68)
- Added support Rails 8.0+ code statistics (#67)
- Migrated to a shared Rubocop configuration for HAUSGOLD gems (#62)
- Added support for Rails 8.1 (#60)
- Switched from
ActiveSupport::Configurableto a custom implementation based onActiveSupport::OrderedOptions(#61)
- Corrected some RuboCop glitches (#56)
- Added a workaround for broken specs when Sidekiq >=8.0.3 is installed (#57)
- Corrected a typo of #54, its
rimless/railtienotrimless/rails(#55)
- Upgraded the rubocop dependencies (#53)
- Make sure to load 'rimless/railtie' when we initialize Rails on the consumer application (#54)
- Added support for Sidekiq 7 in conjunction with Rails (#52)
- Added all versions up to Ruby 3.4 to the CI matrix (#49)
- Added the logger dependency (#48)
- Do not eager load the configuration (#47)
- Switched to Zeitwerk as autoloader (#46)
- Raised minimum supported Ruby/Rails version to 2.7/6.1 (#45)
- Added support for custom topic names via the
full_name:keyword argument on the consumer routing table (#44) - Added support to pass a block to the routing table
(
Rimless.consumer.topics) to add custom topic configurations (#44)
- Corrected the Sidekiq interchanger decoding, which is caused by an upstream update of the karafka-sidekiq-backend gem (#43)
- Added a monkey-patch for the constellation Karafka 1.4 and Thor 1.3, on Ruby >=2.7 (#42)
- Just a retag of 1.7.1
- Just a retag of 1.7.1
- Just a retag of 1.7.1
- Just a retag of 1.7.1
- Added API docs building to continuous integration (#41)
- Added CI tests for Rails 6.1 and 7.1 (#39)
- Dropped support for Ruby <2.7 (#38)
- Moved the schema file validation into the retry block for parallel execution (#37)
- Updated the Kafka Playground to the latest Apache Kafka (3.7) and Schema Registry (7.6) versions (#35)
- Added a retry to write compiled schema files as this may fail on parallel execution (#33)
- Do not extend the
Rimless.loggerto write to stdout by default when running in thedevelopmentenvironment - this generates duplicated messages when the configured logger already writes to stdout. A new configuration was addedRimless.configuration.extend_dev_logger = falsewas added (#32)
- Reverted to use
yield_selfinstead ofthenin order to support Ruby 2.5 as advertised (broken since #19, 1.3.0) (#31)
- Moved the development dependencies from the gemspec to the Gemfile (#29)
- Pinned Karafka gem <1.4.15 in order to suppress the
I_ACCEPT_CRITICAL_ERRORS_IN_KARAFKA_1_4=trueagony (#30)
- Added support for Gem release automation
- Bundler >= 2.3 is from now on required as minimal version (#19)
- Dropped support for Ruby < 2.5 (#19)
- Dropped support for Rails < 5.2 (#19)
- Updated all development/runtime gems to their latest Ruby 2.5 compatible version (#19)
- Added a
capture_kafka_messageshelper for RSpec (#12)
- Corrected the GNU Make release target
- Added support for Karafka
~> 1.4.0and set is as minimum dependency version (#10)
- Mocked WaterDrop producers in the rimless rspec helper so that tests won't actually talk to Kafka (#9)
- Corrected broken stats when no consumer is yet defined (#8)
- Only load the statistics rake task when Rails is available and the environment is development (instead of not production, this may cause issues for +canary+ or +stage+ Rails environments)
- Added the missing +Karafka::Testing::RSpec::Helpers+ include to the RSpec configuration
- Dropped support for Ruby 2.3/2.4 and added support for Rails 6.0 (#6)
- Implemented a simple opinionated Kafka consumer setup (#7)
- Upgraded the avro_turf gem (
~> 0.11.0) (#5)
- Added support for the parallel_tests gem and reconfigure the compiled schema directory to be unique per running test thread. This fixes all race conditions which slow down or break user test suites.
- Added the
Rimless.encode(.avro_encode) andRimless.decode(.avro_decode) helpers/shortcuts to simplify the interaction with the Apache Avro library- The
.encodemethod automatically performs input data sanitation and supports deep relative (to the local namespace) schema resolution. This allows you to access deeply located schemes relative by just providing a leading period (eg..deep.a.b.cbecomesdevelopment.your_app.deep.a.b.c)
- The
- The
.message, '.sync_message', '.async_message' helpers now make use of the new.encodefunctionality which adds transparent data sanitation and schema name features - At the
testenvironment the compiled Avro schemas output path is not deleted anymore, instead the compiled schemas are overwritten. This may keep dead schemas, but it allows parallel test execution without flaws. The removal of the compiled schema directory caused previously file read errors when a parallel process started a recompilation.
- Reconfigure (reset) the AvroTurf instance on tests to avoid caching issues (on failed tests the message decoding was not working which results in unrelated errors, instead of showing the actual test failure)
- Check for unset and empty values while configuring dependencies
- Skip the configuration of the AvroTurf gem in case no schema registry URL is configured, this allows the smooth run of Rails asset precompilations without full environment configurations (eg. on CI)
- Skip the configuration of the WaterDrop gem in case no brokers are configured, this allows the smooth run of Rails asset precompilations without full environment configurations (eg. on CI)
- The first release with support for simple Apache Avro message producing on Apache Kafka/Confluent Schema Registry
- Improved the automatic Avro Schema ERB template compiling and included a JSON validation for each file
- Added a powerful RSpec helper/matcher to ease message producer logic tests
- Added an extensive documentation