All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- TestHelper does not automatically reset Deimos config before each test. #120. Please note that this is a breaking change
-
Fixed issue where producers would stay in an error state after e.g. authorization failures for one topic that wouldn't apply to other topics.
-
Fixed crash when trying to decode a nil payload (e.g. during instrumentation of
send_produce_error
.)
-
Extracted the configuration piece into a separate gem, fig_tree.
-
Added a
save_record
method to ActiveRecordConsumer in case calling code wants to work with the record before saving. -
Fixed a regression where the default values for consumer / Phobos listener configs were not correct (they were all nil). This is technically a breaking change, but it puts the configs back the way they were at version 1.4 and matches the documentation.
-
Fix for
uninitialized constant ActiveSupport::Autoload
in certain circumstances -
Removed unnecessary monkey patch which was crashing on newer versions of ruby-kafka
-
Bumped the version of ruby-kafka to latest
-
Prevents DB Poller from reconnecting to DB if there is an open transaction
-
Replaces
before
byprepend_before
for more consistent test setups. -
Adds validation in the
kafka_producers
method (fixes #90)
- Update Phobos version to allow version 1.9 or 2.x.
- Fix for configuration bug with Ruby 3.0 (** instead of passing hash)
- Fixes for Rails 6.1 (remove usage of
update_attributes!
)
- Add overridable "process_message?" method to ActiveRecordConsumer to allow for skipping of saving/updating records
- Do not apply type coercion to
timestamp-millis
andtimestamp-micros
logical types (fixes #97)
- Do not resend already sent messages when splitting up batches (fixes #24)
- KafkaSource crashing on bulk-imports if import hooks are disabled (fixes #73)
- #96 Use string-safe encoding for partition keys
- Retry on offset seek failures in inline consumer (fixes [#5](Inline consumer should use retries when seeking))
- Add "disabled" config field to consumers to allow disabling individual consumers without having to comment out their entries and possibly affecting unit tests.
- Prepend topic_prefix while encoding messages (fixes #37)
- Raise error if producing without a topic (fixes #50)
- Don't try to load producers/consumers when running rake tasks involving webpacker or assets
- Add details on using schema backend directly in README.
- Default to the provided schema if topic is not provided when
encoding to
AvroSchemaRegistry
. - Add mapping syntax for the
schema
call inSchemaControllerMixin
.
- Added the ability to specify the topic for
publish
andpublish_list
in a producer
- Moved the TestHelpers hook to
before(:suite)
to allow for overriding e.g. in integration tests.
- Fix for crash when sending pending metrics with DB producer.
- Fix for compacting messages if all the keys are already unique (fixes #75)
- Fix for consuming nil payloads with Ruby 2.3.
- Fix regression bug which introduces backwards incompatibility
with ActiveRecordProducer's
record_attributes
method.
- Fix regression bug where arrays were not being encoded
- Simplify decoding messages and handle producer not found
- Consolidate types in sub-records recursively (fixes #72)
- Add
SchemaControllerMixin
to encode and decode schema-encoded payloads in Rails controllers.
- Retry deleting messages without resending the batch if the delete fails (fixes #34)
- Delete messages in batches rather than all at once to cut down on the chance of a deadlock.
- Add
last_processed_at
tokafka_topic_info
to ensure that wait metrics are accurate in cases where records get created with an oldcreated_at
time (e.g. for long-running transactions). - Add generator for ActiveRecord models and migrations (fixes #6)
- Fix crash with batch consumption due to not having ActiveSupport::Concern
- Add
first_offset
to the metadata sent via the batch
- Added
ActiveRecordConsumer
batch mode
- Fixes
send_produce_error
to decodefailed_messages
with built-in decoder. - Lag calculation can be incorrect if no messages are being consumed.
- Fixed bug where printing messages on a MessageSizeTooLarge error didn't work.
- Moved SignalHandler and Executor to the
sigurd
gem.
- Added the DB Poller feature / process.
- Fixed the payload logging fix for errored messages as well.
- Fixed the payload logging fix.
- When saving records via
ActiveRecordConsumer
, updateupdated_at
to today's time even if nothing else was saved. - When logging payloads and metadata, decode them first.
- Fixes bug in
KafkaSource
that crashes when importing a mix of existing and new records with the:on_duplicate_key_update
option.
- Re-consuming a message after crashing would try to re-decode message keys.
- Removed
was_message_sent?
method fromTestHelpers
.
- Updated dependency for Phobos to 1.9.0-beta3. This ensures compatibility with Phobos 2.0.
- Fixed RSpec warning when using
test_consume_invalid_message
.
- Added schema backends, which should simplify Avro encoding and make it more flexible for unit tests and local development.
- Add
:test
producer backend which replaces the existing TestHelpers functionality of writing messages to an in-memory hash.
- Clone loggers when assigning to multiple levels.
- Added default for max_bytes_per_partition.
- Added
define_settings
to define settings without invoking callbacks.
- Settings with default_proc were being called immediately instead of being lazy-evaluated.
- Complete revamp of configuration method.
- Added
db_producer.insert
anddb_producer.process
metrics.
- Fixed bug where by running
rake deimos:start
without specifying a producer backend would crash.
- Fixed bug in TestHelpers where key_decoder was not stubbed out.
- Fixed bug where consumers would require a key config in all cases even though it's optional if they don't use keys.
- Added
fetch_record
andassign_key
methods to ActiveRecordConsumer.
- Added
fatal_error
to both global config and consumer classes. - Changed
pending_db_messages_max_wait
metric to send per topic. - Added config to compact messages in the DB producer.
- Added config to log messages in the DB producer.
- Added config to provide a separate logger to the DB producer.
- Fixed bug where ActiveRecordConsumer was not using
unscoped
to update via primary key and causing duplicate record errors.
- Added BatchConsumer.
- Official release of Deimos 1.0!
- Recover from Kafka::MessageSizeTooLarge in the DB producer.
- Shut down sync producers correctly when persistent_connections is true.
- Notify when messages fail to produce in the DB producer.
- Delete messages on failure and rely on notification.
- Fix bug where crashing would cause producers to stay disabled
- Reconnect DB backend if database goes away.
- Sleep only 5 seconds between attempts instead of using exponential backoff.
- Fix for null payload being Avro-encoded.
- Fix bug where nil payloads were not being saved to the DB.
- Fix DB producer rake task looking at THREADS env var instead of THREAD_COUNT.
- Debug messages in the DB producer if debug logs are turned on.
- Changed logger in specs to info.
- Add
pending_db_messages_max_wait
metric for the DB producer. - Fix mock metrics to allow optional option hashes.
- Handle Phobos
persistent_connections
setting in handling buffer overflows
- Catch buffer overflows when producing via the DB producer and split the batch up.
- Fix for DB producer crashing on error in Rails 3.
- Fixed crash when sending metrics in a couple of places.
- Added
rails deimos:db_producer
rake task. - Fixed the DB producer so it runs inline instead of on a separate thread. Calling code should run it on a thread manually if that is the desired behavior.
- Initial release.