rdkafka-ruby
rdkafka-ruby copied to clipboard
Format inconsistency between producing and consuming of messages with headers
When producing messages, this doc specifies that both keys and values should be string:
https://github.com/appsignal/rdkafka-ruby/blob/b7c790b21427ad419d8144d6c56b0655e2148adc/lib/rdkafka/producer.rb#L81
but when received, they (headers) are casted to symbols:
https://github.com/appsignal/rdkafka-ruby/blob/b7c790b21427ad419d8144d6c56b0655e2148adc/lib/rdkafka/consumer/headers.rb#L54
This creates inconsistency of expectations and may be confusing to developers.
My suggestion, since all the headers upon production are anyhow casted to strings, would be to either allow symbolized keys in producer (doc update_ or to keep consumption headers as strings (preferred).