mehbey commented on code in PR #14135:
URL: https://github.com/apache/kafka/pull/14135#discussion_r1289521270


##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -1862,7 +1884,35 @@ class KafkaConfig private(doLog: Boolean, val props: 
java.util.Map[_, _], dynami
     else MetadataVersion.fromVersionString(logMessageFormatVersionString)
 
   def logMessageTimestampType = 
TimestampType.forName(getString(KafkaConfig.LogMessageTimestampTypeProp))
+
+  /* See `TopicConfig.MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_CONFIG` for details 
*/
+  @deprecated("3.6")
   def logMessageTimestampDifferenceMaxMs: Long = 
getLong(KafkaConfig.LogMessageTimestampDifferenceMaxMsProp)
+
+  // In the transition period before logMessageTimestampDifferenceMaxMs is 
removed, to maintain backward compatibility,
+  // we are using its value if logMessageTimestampBeforeMaxMs default value 
hasn't changed.
+  @nowarn("cat=deprecation")
+  def logMessageTimestampBeforeMaxMs: Long = {
+    val messageTimestampBeforeMaxMs: Long = 
getLong(KafkaConfig.LogMessageTimestampBeforeMaxMsProp)
+    if (messageTimestampBeforeMaxMs != Long.MaxValue) {

Review Comment:
   yeah that make sense - updated.



##########
core/src/test/scala/integration/kafka/api/PlaintextProducerSendTest.scala:
##########
@@ -120,17 +121,17 @@ class PlaintextProducerSendTest extends 
BaseProducerSendTest {
     }
   }
 
-  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)

Review Comment:
   `quorum: String` this parameter was not used in the test. There are similar 
unit tests in this file which defines parameters like this @ValueSource(strings 
= Array("zk", "kraft")) but don't actually use them in the test. I have 
refrained from cleaning all the tests not to pollute this PR but that can be a 
quick follow up PR separately.
   
   If there is some reason which I missed but we still want to the parametrized 
value, we can add it to the argument provider method like 
   
   ```
    Arguments.of("zk", TopicConfig.MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_CONFIG, 
Long.box(System.currentTimeMillis() - fiveMinutesInMs)),
         Arguments.of("zk", TopicConfig.MESSAGE_TIMESTAMP_BEFORE_MAX_MS_CONFIG, 
Long.box(System.currentTimeMillis() - fiveMinutesInMs)),
         Arguments.of("zk", TopicConfig.MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG, 
Long.box(System.currentTimeMillis() + fiveMinutesInMs)),
    Arguments.of("kraft", 
TopicConfig.MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_CONFIG, 
Long.box(System.currentTimeMillis() - fiveMinutesInMs)),
         Arguments.of("kraft", 
TopicConfig.MESSAGE_TIMESTAMP_BEFORE_MAX_MS_CONFIG, 
Long.box(System.currentTimeMillis() - fiveMinutesInMs)),
         Arguments.of("kraft", 
TopicConfig.MESSAGE_TIMESTAMP_AFTER_MAX_MS_CONFIG, 
Long.box(System.currentTimeMillis() + fiveMinutesInMs)),
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to