flipp-oss / deimos

Framework to work with Kafka, Avro and ActiveRecord
Other
59 stars 22 forks source link

ActiveRecordConsumer assumes key is id when deleting or updating #21

Closed dorner closed 4 years ago

dorner commented 4 years ago

Currently, ActiveRecordConsumer will delete or update a record by finding it based on the key. This assumes that the key is always the primary key of the record, which isn't always true. We should refactor this into a fetch_record method which can be overridden similar to other methods.

Even better, use the key schema to fetch records.