Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added support for message timestamp #915

Merged
merged 16 commits into from
Jul 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SuppressWarnings checkstyle's ParameterNumber rule
Signed-off-by: Antonio Pedro <[email protected]>
  • Loading branch information
antonio-pedro99 committed Jul 22, 2024
commit 9d4e4ad66b0d398f90e92ca2d5fcb0d46c58c666
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public BasicKafkaClient(String bootstrapServer) {
* @param withNullKeyRecord boolean, which allowing sending messages with NULL key
* @return sent message count
*/
@SuppressWarnings("checkstyle:ParameterNumber")
public int sendStringMessagesPlain(long timeoutMs, String topicName, int messageCount, List<KafkaHeader> headers,
String message, int partition, Long timestamp, boolean withNullKeyRecord) {
CompletableFuture<Integer> resultPromise = new CompletableFuture<>();
Expand Down Expand Up @@ -118,6 +119,7 @@ public int sendStringMessagesPlain(String topicName, String message, int message
* @param withNullKeyRecord boolean, which allowing sending messages with NULL key
* @return sent message count
*/
@SuppressWarnings("checkstyle:ParameterNumber")
public int sendJsonMessagesPlain(long timeoutMs, String topicName, int messageCount, List<KafkaHeader> headers,
String message, int partition, Long timestamp, boolean withNullKeyRecord) {
CompletableFuture<Integer> resultPromise = new CompletableFuture<>();
Expand Down Expand Up @@ -170,7 +172,7 @@ public int sendJsonMessagesPlain(String topicName, int messageCount, String mess
*/
public int sendJsonMessagesPlain(String topicName, int messageCount, String message, int partition, boolean withNullKeyRecord) {
return sendJsonMessagesPlain(Duration.ofMinutes(2).toMillis(), topicName, messageCount, List.of(),
message, partition,null, withNullKeyRecord);
message, partition, null, withNullKeyRecord);
antonio-pedro99 marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand All @@ -185,7 +187,7 @@ public int sendJsonMessagesPlain(String topicName, int messageCount, String mess
*/
public int sendJsonMessagesPlain(String topicName, int messageCount, List<KafkaHeader> headers, String message,
boolean withNullKeyRecord) {
return sendJsonMessagesPlain(Duration.ofMinutes(2).toMillis(), topicName, messageCount, headers, message, 0,null, withNullKeyRecord);
return sendJsonMessagesPlain(Duration.ofMinutes(2).toMillis(), topicName, messageCount, headers, message, 0, null, withNullKeyRecord);
}

/**
Expand All @@ -199,7 +201,7 @@ public int sendJsonMessagesPlain(String topicName, int messageCount, List<KafkaH
*/
public int sendJsonMessagesPlain(String topicName, int messageCount, String message, int partition) {
return sendJsonMessagesPlain(Duration.ofMinutes(2).toMillis(), topicName, messageCount, List.of(),
message, partition,null, false);
message, partition, null, false);
antonio-pedro99 marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand All @@ -212,7 +214,7 @@ public int sendJsonMessagesPlain(String topicName, int messageCount, String mess
*/
public int sendJsonMessagesPlain(String topicName, int messageCount, String message) {
return sendJsonMessagesPlain(Duration.ofMinutes(2).toMillis(), topicName, messageCount, List.of(),
message, 0, null,false);
message, 0, null, false);
antonio-pedro99 marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down