@@ -81,13 +81,28 @@ private KafkaTestUtils() {
8181 * @param autoCommit the auto commit.
8282 * @param embeddedKafka a {@link EmbeddedKafkaBroker} instance.
8383 * @return the properties.
84+ * @deprecated please, use {@link #consumerProps(EmbeddedKafkaBroker, String, boolean)} instead
8485 */
86+ @ Deprecated (forRemoval = true , since = "4.0.0" )
8587 public static Map <String , Object > consumerProps (String group , String autoCommit ,
8688 EmbeddedKafkaBroker embeddedKafka ) {
8789
8890 return consumerProps (embeddedKafka .getBrokersAsString (), group , autoCommit );
8991 }
9092
93+ /**
94+ * Set up test properties for an {@code <Integer, String>} consumer.
95+ * @param group the group id.
96+ * @param autoCommit the auto commit.
97+ * @param embeddedKafka a {@link EmbeddedKafkaBroker} instance.
98+ * @return the properties.
99+ */
100+ public static Map <String , Object > consumerProps (EmbeddedKafkaBroker embeddedKafka , String group ,
101+ boolean autoCommit ) {
102+
103+ return consumerProps (embeddedKafka .getBrokersAsString (), group , autoCommit );
104+ }
105+
91106 /**
92107 * Set up test properties for an {@code <Integer, String>} consumer.
93108 * @param brokers the bootstrapServers property.
@@ -114,8 +129,21 @@ public static Map<String, Object> producerProps(EmbeddedKafkaBroker embeddedKafk
114129 * @param group the group id.
115130 * @param autoCommit the auto commit.
116131 * @return the properties.
117- */
132+ * @deprecated Please, use {@link #consumerProps(String, String, boolean)} instead.
133+ */
134+ @ Deprecated (forRemoval = true , since = "4.0.0" )
118135 public static Map <String , Object > consumerProps (String brokers , String group , String autoCommit ) {
136+ return consumerProps (brokers , group , Boolean .parseBoolean (autoCommit ));
137+ }
138+
139+ /**
140+ * Set up test properties for an {@code <Integer, String>} consumer.
141+ * @param brokers the bootstrapServers property.
142+ * @param group the group id.
143+ * @param autoCommit the auto commit.
144+ * @return the properties.
145+ */
146+ public static Map <String , Object > consumerProps (String brokers , String group , boolean autoCommit ) {
119147 Map <String , Object > props = new HashMap <>();
120148 props .put (ConsumerConfig .BOOTSTRAP_SERVERS_CONFIG , brokers );
121149 props .put (ConsumerConfig .GROUP_ID_CONFIG , group );
0 commit comments