azure-functions-kafka-extension icon indicating copy to clipboard operation
azure-functions-kafka-extension copied to clipboard

KafkaAttribute.MaxMessageBytes is never used in KafkaProducerFactory

Open shaunco opened this issue 5 years ago • 2 comments

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#.

shaunco avatar Sep 14 '20 03:09 shaunco

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.

TsuyoshiUshio avatar Sep 16 '20 21:09 TsuyoshiUshio

This is addressed in #179, and all the other nullable attribute parameters are fixed in #175

gliljas avatar Nov 18 '20 21:11 gliljas