Skip to content

Commit

Permalink
GH-2916: Docs for EmbedKafkaKraftBrokerkafka ports
Browse files Browse the repository at this point in the history
Fixes: #2916

It is not possible to propagate provided kafka ports to KafkaClusterTestKit at the moment.
We are documenting this via javadocs.
  • Loading branch information
sobychacko committed Nov 29, 2023
1 parent ff0c853 commit 37cbbd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ public EmbeddedKafkaBroker brokerProperty(String property, Object value) {
}

/**
* IMPORTANT: It is not possible to configure custom ports when using KRaft based EmbeddedKafka.
* The {@link KafkaClusterTestKit} does not support setting custom ports at the moment.
* Therefore, this property is out of use.
* Set explicit ports on which the kafka brokers will listen. Useful when running an
* embedded broker that you want to access from other processes.
* @param ports the ports.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,15 @@
* Set explicit ports on which the kafka brokers will listen. Useful when running an
* embedded broker that you want to access from other processes.
* A port must be provided for each instance, which means the number of ports must match the value of the count attribute.
* This property is not valid when using KRaft mode.
* @return ports for brokers.
* @since 2.2.4
*/
int[] ports() default { 0 };

/**
* Set the port on which the embedded Zookeeper should listen;
* Set the port on which the embedded Zookeeper should listen.
* This property is not valid when using KRaft mode.
* @return the port.
* @since 2.3
*/
Expand Down Expand Up @@ -165,14 +167,16 @@

/**
* Timeout for internal ZK client connection.
* @return default {@link EmbeddedKafkaBroker#DEFAULT_ZK_CONNECTION_TIMEOUT}.
* This property is not valid when using KRaft mode.
* @return default {@link EmbeddedKafkaZKBroker#DEFAULT_ZK_CONNECTION_TIMEOUT}.
* @since 2.4
*/
int zkConnectionTimeout() default EmbeddedKafkaZKBroker.DEFAULT_ZK_CONNECTION_TIMEOUT;

/**
* Timeout for internal ZK client session.
* @return default {@link EmbeddedKafkaBroker#DEFAULT_ZK_SESSION_TIMEOUT}.
* This property is not valid when using KRaft mode.
* @return default {@link EmbeddedKafkaZKBroker#DEFAULT_ZK_SESSION_TIMEOUT}.
* @since 2.4
*/
int zkSessionTimeout() default EmbeddedKafkaZKBroker.DEFAULT_ZK_SESSION_TIMEOUT;
Expand Down

0 comments on commit 37cbbd2

Please sign in to comment.