smallrye-reactive-messaging icon indicating copy to clipboard operation
smallrye-reactive-messaging copied to clipboard

[Kafka Test Companion] Inconsistent handling of properties

Open Abaudat opened this issue 1 year ago • 1 comments

The problem

In Kafka Test Companion's ProducerBuilder and ConsumerBuilder, the properties seem to be treated inconsistently:

  • The constructors of both ProducerBuilder and ConsumerBuilder use the signature Map<String, Object>
  • The properties field in both ProducerBuilder and ConsumerBuilder also use the signature Map<String, Object>
  • The method ConsumerBuilder#withProps also use the signature Map<String, Object>

However:

As both KafkaConsumer and KafkaProducer support properties of the form Map<String, Object>, it seems like ProducerBuilder and ConsumerBuilder should use this form instead of restricting the property value to String.

Suggestion of implementation

I am willing to work on the PR, I just need confirmation that this change would be welcome.

Abaudat avatar Feb 16 '24 15:02 Abaudat