Class InternalKafkaClient
- java.lang.Object
-
- io.strimzi.systemtest.kafkaclients.AbstractKafkaClient<InternalKafkaClient.Builder>
-
- io.strimzi.systemtest.kafkaclients.internalClients.InternalKafkaClient
-
- All Implemented Interfaces:
KafkaClientOperations
public class InternalKafkaClient extends AbstractKafkaClient<InternalKafkaClient.Builder> implements KafkaClientOperations
The InternalKafkaClient for sending and receiving messages using basic properties. The client is using an internal listeners and communicate from the pod.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InternalKafkaClient.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertSentAndReceivedMessages(int sent, int received)
Assert count of sent and received messagesvoid
checkProducedAndConsumedMessages(int producedMessages, int consumedMessages)
String
getPodName()
int
receiveMessagesPlain()
int
receiveMessagesPlain(long timeout)
Receiving plain messages with the selected clientint
receiveMessagesTls()
int
receiveMessagesTls(long timeoutMs)
Method for receive messages from specific kafka cluster.int
sendMessagesPlain()
int
sendMessagesPlain(long timeout)
Method for send messages to specific kafka cluster.int
sendMessagesTls()
int
sendMessagesTls(long timeout)
Sending encrypted messages using Tls technology with the selected clientInternalKafkaClient.Builder
toBuilder()
-
Methods inherited from class io.strimzi.systemtest.kafkaclients.AbstractKafkaClient
getBootstrapServerFromStatus, getCaCertName, getConsumerGroup, getConsumerProperties, getKafkaUsername, getListenerName, getMessageCount, getPartition, getProducerProperties, getSecretPrefix, getSecurityProtocol, getTopicName, setMessageCount, toString, verifyProducedAndConsumedMessages
-
-
-
-
Method Detail
-
toBuilder
public InternalKafkaClient.Builder toBuilder()
-
sendMessagesPlain
public int sendMessagesPlain()
-
sendMessagesPlain
public int sendMessagesPlain(long timeout)
Method for send messages to specific kafka cluster. It uses test-client API for communication with deployed clients inside kubernetes cluster- Specified by:
sendMessagesPlain
in interfaceKafkaClientOperations
- Parameters:
timeout
- timeout in milliseconds- Returns:
- count of send and acknowledged messages
-
sendMessagesTls
public int sendMessagesTls()
-
sendMessagesTls
public int sendMessagesTls(long timeout)
Description copied from interface:KafkaClientOperations
Sending encrypted messages using Tls technology with the selected client- Specified by:
sendMessagesTls
in interfaceKafkaClientOperations
- Parameters:
timeout
- timeout in milliseconds- Returns:
- count of messages
-
receiveMessagesPlain
public int receiveMessagesPlain()
-
receiveMessagesPlain
public int receiveMessagesPlain(long timeout)
Description copied from interface:KafkaClientOperations
Receiving plain messages with the selected client- Specified by:
receiveMessagesPlain
in interfaceKafkaClientOperations
- Parameters:
timeout
- timeout in milliseconds- Returns:
- count of messages
-
receiveMessagesTls
public int receiveMessagesTls()
-
receiveMessagesTls
public int receiveMessagesTls(long timeoutMs)
Method for receive messages from specific kafka cluster. It uses test-client API for communication with deployed clients inside kubernetes cluster- Specified by:
receiveMessagesTls
in interfaceKafkaClientOperations
- Parameters:
timeoutMs
- timeout in milliseconds- Returns:
- count of received messages
-
checkProducedAndConsumedMessages
public void checkProducedAndConsumedMessages(int producedMessages, int consumedMessages)
-
assertSentAndReceivedMessages
public void assertSentAndReceivedMessages(int sent, int received)
Assert count of sent and received messages- Parameters:
sent
- count of sent messagesreceived
- count of received messages
-
getPodName
public String getPodName()
-
-