azure-functions-kafka-extension
azure-functions-kafka-extension copied to clipboard
KafkaAttribute.MaxMessageBytes is never used in KafkaProducerFactory
It is currently impossible to produce messages over 1MB because KafkaAttribute.MaxMessageBytes is never used in KafkaProducerFactory. MaxMessageBytes is also not exposed via KafkaOptions, so I can't set it in host.json either.
Additionally, MaxMessageBytes can't be set directly as an attribute:
[Kafka(@"%Merge_Broker%",
@"%Merge_TopicName%",
MaxMessageBytes = 999999999, // <-------
Protocol = BrokerProtocol.Plaintext,
AuthenticationMode = BrokerAuthenticationMode.NotSet,
SslCaLocation = "%Merge_SslCaLocation%")] IAsyncCollector<KafkaEventData<string>> collector,
Because int? is not a valid attribute type in C#.
Thank you, @shaunco to notice it. I check the code and I confirm that the value is not used. I'll find a time to implement it.
This is addressed in #179, and all the other nullable attribute parameters are fixed in #175