@@ -61,10 +61,10 @@ public int sendStringMessagesPlain(long timeoutMs, String topicName, int message
61
61
properties .setProperty (CommonClientConfigs .SECURITY_PROTOCOL_CONFIG , SecurityProtocol .PLAINTEXT .name );
62
62
63
63
try (Producer plainProducer = new Producer .ProducerBuilder (resultPromise , msgCntPredicate , topicName , message , partition , timestamp )
64
- .withProperties (properties )
65
- .withHeaders (headers )
66
- .withNullKeyRecord (withNullKeyRecord )
67
- .build ()) {
64
+ .withProperties (properties )
65
+ .withHeaders (headers )
66
+ .withNullKeyRecord (withNullKeyRecord )
67
+ .build ()) {
68
68
69
69
plainProducer .getVertx ().deployVerticle (plainProducer );
70
70
@@ -84,7 +84,7 @@ public int sendStringMessagesPlain(long timeoutMs, String topicName, int message
84
84
*/
85
85
public int sendStringMessagesPlain (String topicName , int messageCount ) {
86
86
return sendStringMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount ,
87
- List .of (), "\" Hello\" : \" World\" " , 0 , null , false );
87
+ List .of (), "\" Hello\" : \" World\" " , 0 , null , false );
88
88
}
89
89
90
90
/**
@@ -93,17 +93,17 @@ public int sendStringMessagesPlain(String topicName, int messageCount) {
93
93
* @param topicName topic name where messages are send
94
94
* @param message content to be sent
95
95
* @param messageCount message count
96
- * @param partition partition, which will be selected
96
+ * @param partition partition, which will be selected
97
97
* @return sent message count
98
98
*/
99
99
public int sendStringMessagesPlain (String topicName , String message , int messageCount , int partition ) {
100
100
return sendStringMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount ,
101
- List .of (), message , partition , null , true );
101
+ List .of (), message , partition , null , true );
102
102
}
103
103
104
104
public int sendStringMessagesPlain (String topicName , String message , int messageCount , int partition , boolean withNullKeyRecord ) {
105
105
return sendStringMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount ,
106
- List .of (), message , partition , null , withNullKeyRecord );
106
+ List .of (), message , partition , null , withNullKeyRecord );
107
107
}
108
108
109
109
/**
@@ -133,10 +133,10 @@ public int sendJsonMessagesPlain(long timeoutMs, String topicName, int messageCo
133
133
properties .setProperty (ProducerConfig .CLIENT_ID_CONFIG , "producer-sender-plain-" + new Random ().nextInt (Integer .MAX_VALUE ));
134
134
properties .setProperty (CommonClientConfigs .SECURITY_PROTOCOL_CONFIG , SecurityProtocol .PLAINTEXT .name );
135
135
try (Producer plainProducer = new Producer .ProducerBuilder (resultPromise , msgCntPredicate , topicName , message , partition , timestamp )
136
- .withProperties (properties )
137
- .withHeaders (headers )
138
- .withNullKeyRecord (withNullKeyRecord )
139
- .build ()) {
136
+ .withProperties (properties )
137
+ .withHeaders (headers )
138
+ .withNullKeyRecord (withNullKeyRecord )
139
+ .build ()) {
140
140
plainProducer .getVertx ().deployVerticle (plainProducer );
141
141
142
142
return plainProducer .getResultPromise ().get (timeoutMs , TimeUnit .MILLISECONDS );
@@ -157,7 +157,7 @@ public int sendJsonMessagesPlain(long timeoutMs, String topicName, int messageCo
157
157
*/
158
158
public int sendJsonMessagesPlain (String topicName , int messageCount , String message , Long timestamp ) {
159
159
return sendJsonMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount , List .of (),
160
- message , 0 , timestamp , false );
160
+ message , 0 , timestamp , false );
161
161
}
162
162
163
163
/**
@@ -172,7 +172,7 @@ public int sendJsonMessagesPlain(String topicName, int messageCount, String mess
172
172
*/
173
173
public int sendJsonMessagesPlain (String topicName , int messageCount , String message , int partition , boolean withNullKeyRecord ) {
174
174
return sendJsonMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount , List .of (),
175
- message , partition , null , withNullKeyRecord );
175
+ message , partition , null , withNullKeyRecord );
176
176
}
177
177
178
178
/**
@@ -195,26 +195,26 @@ public int sendJsonMessagesPlain(String topicName, int messageCount, List<KafkaH
195
195
*
196
196
* @param topicName topic name where messages are send
197
197
* @param messageCount message count
198
- * @param message specific message to send
199
- * @param partition partition count, how many shards/partitions will topic have
198
+ * @param message specific message to send
199
+ * @param partition partition count, how many shards/partitions will topic have
200
200
* @return sent message count
201
201
*/
202
202
public int sendJsonMessagesPlain (String topicName , int messageCount , String message , int partition ) {
203
203
return sendJsonMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount , List .of (),
204
- message , partition , null , false );
204
+ message , partition , null , false );
205
205
}
206
206
207
207
/**
208
208
* Send messages to entry-point of the kafka cluster with PLAINTEXT security protocol setting
209
209
*
210
210
* @param topicName topic name where messages are send
211
211
* @param messageCount message count
212
- * @param message specific message to send
212
+ * @param message specific message to send
213
213
* @return sent message count
214
214
*/
215
215
public int sendJsonMessagesPlain (String topicName , int messageCount , String message ) {
216
216
return sendJsonMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount , List .of (),
217
- message , 0 , null , false );
217
+ message , 0 , null , false );
218
218
}
219
219
220
220
/**
@@ -226,7 +226,7 @@ public int sendJsonMessagesPlain(String topicName, int messageCount, String mess
226
226
*/
227
227
public int sendJsonMessagesPlain (String topicName , int messageCount ) {
228
228
return sendJsonMessagesPlain (Duration .ofMinutes (2 ).toMillis (), topicName , messageCount , List .of (),
229
- "{\" Hello\" : \" World\" }" , 0 , null , false );
229
+ "{\" Hello\" : \" World\" }" , 0 , null , false );
230
230
}
231
231
232
232
/**
0 commit comments