flipp-oss / deimos

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

ActiveRecordConsumer does not replicate the behaviour of ActiveRecord::Persistence#touch #63

Closed JennyFlipp closed 4 years ago

JennyFlipp commented 4 years ago

The ActiveRecordConsumer does not update records when a producer produces a message where the only change to the record is a change to the updated_at field (ex. when triggered by the touch method).

As seen on line 74, the updated_at and created_at fields are not included in the return hash used by the consume method to update the record.

This becomes problematic as the record's updated_at timestamp will not reflect the timestamp associated with the original record and does not replicate the behaviour of the ActiveRecord touch method. As shown here, the timestamps of the record will retain their original values.