ferenc-csaky commented on code in PR #111:
URL: 
https://github.com/apache/flink-connector-pulsar/pull/111#discussion_r2466416862


##########
flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/config/SourceConfiguration.java:
##########
@@ -136,7 +137,7 @@ public long getAutoCommitCursorInterval() {
      * messages in {@link RecordsWithSplitIds} when meet this timeout and no 
message consumed.
      */
     public int getFetchOneMessageTime() {
-        return fetchOneMessageTime;
+        return (int) fetchOneMessageTime;

Review Comment:
   Good catch. Cannot do much about this, as the pulsar client requires an 
`int` value for this, and `Duration.toMillis()` return a `long`. I don't think 
there can be any case, where someone types in a duration that turns into a 
bigger number than `Integer.MAX_VALUE`. Since I can type in durations like 
`5d`, having an explicit check that says you need to type in a lower number 
than `2147483647` would be more helpful than the cast exception.
   
   Well, we could leave this as an `int`, but it is much better UX to be able 
to write duration strings than raw millis, so I would consider the current 
state better then it was before.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to