Skip to content

Commit beef2e6

Browse files
committed
Use unique consumer groups in KafkaDslKotlinTests
1 parent 0951738 commit beef2e6

File tree

1 file changed

+10
-2
lines changed
  • spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin

1 file changed

+10
-2
lines changed

spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt

+10-2
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ class KafkaDslKotlinTests {
228228
.configureListenerContainer {
229229
it.ackMode(ContainerProperties.AckMode.MANUAL)
230230
.id("topic1ListenerContainer")
231+
.groupId("kotlin_topic1_group")
232+
231233
}
232234
.errorChannel(errorChannel())
233235
.retryTemplate(RetryTemplate())
@@ -248,7 +250,10 @@ class KafkaDslKotlinTests {
248250
consumerFactory(),
249251
KafkaMessageDrivenChannelAdapter.ListenerMode.record, TEST_TOPIC2
250252
)
251-
.configureListenerContainer { it.ackMode(ContainerProperties.AckMode.MANUAL) }
253+
.configureListenerContainer {
254+
it.ackMode(ContainerProperties.AckMode.MANUAL)
255+
.groupId("kotlin_topic2_group")
256+
}
252257
.errorChannel(errorChannel())
253258
.retryTemplate(RetryTemplate())
254259
.filterInRetry(true)) {
@@ -302,7 +307,10 @@ class KafkaDslKotlinTests {
302307

303308
@Bean
304309
fun sourceFlow() =
305-
integrationFlow(Kafka.inboundChannelAdapter(consumerFactory(), ConsumerProperties(TEST_TOPIC3)),
310+
integrationFlow(Kafka.inboundChannelAdapter(consumerFactory(),
311+
ConsumerProperties(TEST_TOPIC3).also {
312+
it.setGroupId("kotlinMessageSourceGroup")
313+
}),
306314
{ poller(Pollers.fixedDelay(100)) }) {
307315
handle { m ->
308316
this@ContextConfiguration.fromSource = m.payload

0 commit comments

Comments
 (0)