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 classInternalKafkaClient.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertSentAndReceivedMessages(int sent, int received)Assert count of sent and received messagesvoidcheckProducedAndConsumedMessages(int producedMessages, int consumedMessages)StringgetPodName()intreceiveMessagesPlain()intreceiveMessagesPlain(long timeout)Receiving plain messages with the selected clientintreceiveMessagesTls()intreceiveMessagesTls(long timeoutMs)Method for receive messages from specific kafka cluster.intsendMessagesPlain()intsendMessagesPlain(long timeout)Method for send messages to specific kafka cluster.intsendMessagesTls()intsendMessagesTls(long timeout)Sending encrypted messages using Tls technology with the selected clientInternalKafkaClient.BuildertoBuilder()-
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:
sendMessagesPlainin 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:KafkaClientOperationsSending encrypted messages using Tls technology with the selected client- Specified by:
sendMessagesTlsin interfaceKafkaClientOperations- Parameters:
timeout- timeout in milliseconds- Returns:
- count of messages
-
receiveMessagesPlain
public int receiveMessagesPlain()
-
receiveMessagesPlain
public int receiveMessagesPlain(long timeout)
Description copied from interface:KafkaClientOperationsReceiving plain messages with the selected client- Specified by:
receiveMessagesPlainin 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:
receiveMessagesTlsin 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()
-
-