Package io.strimzi.systemtest.kafkaclients.internalClients

## 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 messages
    `void` | `checkProducedAndConsumedMessages​(int producedMessages, int consumedMessages)` |
    `String` | `getPodName()` |
    `int` | `receiveMessagesPlain()` |
    `int` | `receiveMessagesPlain​(long timeout)` | Receiving plain messages with the selected client
    `int` | `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 client
    `InternalKafkaClient.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`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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 interface `KafkaClientOperations`
      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 interface `KafkaClientOperations`
      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 interface `KafkaClientOperations`
      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 interface `KafkaClientOperations`
      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 messages
        `received` - count of received messages

    - #### getPodName

          public String getPodName()