You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For experiment, I've commented the code above and everything works.
Just some more information. The reason for that is hidden in how librdkafka works. It has some 'modified' flags inside that changes even if we set values to default, while remain unchanged when config is untouched:
The issue here is not that swift-kafka-client is setting the modified flag on the librdkafka configuration properties.
The problem here is that in the following code snippet:
if (conf->eos.transactional_id) {
if (!rd_kafka_topic_conf_is_modified(
tconf, "message.timeout.ms"))
tconf->message_timeout_ms=conf->eos.transaction_timeout_ms;
elseif (tconf->message_timeout_ms>conf->eos.transaction_timeout_ms)
return"`message.timeout.ms` must be set <= ""`transaction.timeout.ms`";
}
Local message timeout. This value is only enforced locally and limits the time a produced message waits for successful delivery. A time of 0 is infinite. This is the maximum time librdkafka may use to deliver a message (including retries). Delivery error occurs when either the retry count or the message timeout are exceeded. The message timeout is automatically adjusted to transaction.timeout.ms if transactional.id is configured.
We should make sure that we keep these values in-sync ourselves once the Transactional Producer is implemented alongside the transaction.timeout.ms property.
This would take the shape of:
if (!rd_kafka_topic_conf_is_modified(
tconf, "message.timeout.ms"))
tconf->message_timeout_ms=conf->eos.transaction_timeout_ms;
(Automatically adjusting message.timeout.ms to be equal to transaction.timeout.ms
It is not something obvious in librdkafka but if we set topic config to default values, config become modified.
That may cause unexpected behaviour.
For example, I use the following config (dump):
After the code in RDKafkaTopicConfig:
it is not changed:
But since these values are modified, I have the following error:
For experiment, I've commented the code above and everything works.
Just some more information. The reason for that is hidden in how librdkafka works. It has some 'modified' flags inside that changes even if we set values to default, while remain unchanged when config is untouched:
Furthermore, topic config supports
nullptr
(aka swiftnil
) value that creates default topic configuration.I see several options here for gsoc interface (though, might be more):
The text was updated successfully, but these errors were encountered: