flipp-oss / deimos

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

Add support for message headers #194

Closed yannp closed 1 year ago

yannp commented 1 year ago

Pull Request Template

Description

Original issue: https://github.com/flipp-oss/deimos/issues/192

Currently deimos doesn't support providing :headers to phobos when publishing a message. A monkeypatch prevents it.

Fixes #192 (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

dorner commented 1 year ago

Looks great! Thanks for the contribution!

yannp commented 1 year ago

@dorner I realise that with this PR I didn't address the DB backend properly. This would require to add a headers column to the kafka_messages table. That would be a major update as I understand it. What do you think?

dorner commented 1 year ago

Hmm... let's see if we can do it wrapped in some checks (respond_to?, checking columns etc.) so it wouldn't break backwards compatibility.