Description
Is seems like the ecotone/kafka does not use the OutputDefaultConversionMediaType in the KafkaPublisherConfiguration for use with MessagePublisher::convertAndSend
It not being passed through to the OutboundMessageConverter being the reason i think because the creation of the converter is hard coded in KafkaOutboundChannelAdapter
$this->outboundMessageConverter = new OutboundMessageConverter($headerMapper);
The other outbound channel implementations using enqueue seem to support this in some capacity.
It would be nice to support this, we would need to send JSON to kafka.
Example
#[EventHandler]
public function whenSubscriptionWasUpdated(
OrderWasUpdated $event,
#[Reference('produce.update')]
MessagePublisher $messagePublisher
): void
{
$messagePublisher->convertAndSend(
new OrderUpdated($event->getOrderId())
);
}
will always be converted to serialized php
Description
Is seems like the
ecotone/kafkadoes not use theOutputDefaultConversionMediaTypein theKafkaPublisherConfigurationfor use withMessagePublisher::convertAndSendIt not being passed through to the
OutboundMessageConverterbeing the reason i think because the creation of the converter is hard coded in KafkaOutboundChannelAdapter$this->outboundMessageConverter = new OutboundMessageConverter($headerMapper);The other outbound channel implementations using enqueue seem to support this in some capacity.
It would be nice to support this, we would need to send JSON to kafka.
Example
will always be converted to serialized php