1
@KafkaListener에서 지정 대 소비자봄 카프카 소비자/리스너 그룹
spring.kafka.consumer.group-id
에서 그룹을 지정의 차이는 무엇인가?
@KafkaListener(topic="test", group = "test-grp")
@KafkaListener에서 지정 대 소비자봄 카프카 소비자/리스너 그룹
spring.kafka.consumer.group-id
에서 그룹을 지정의 차이는 무엇인가?
@KafkaListener(topic="test", group = "test-grp")
group
속성에 대해서는 javadocs를 참조하십시오. 그것은
/**
* If provided, the listener container for this listener will be added to a bean
* with this value as its name, of type {@code Collection<MessageListenerContainer>}.
* This allows, for example, iteration over the collection to start/stop a subset
* of containers.
* @return the bean name for the group.
*/
이
1.3/2.0containerGroup
변경되었습니다 ... 카프카
group.id
과는 아무 상관이 없습니다.
그 릴리스 버전도 제공합니다 ...
/**
* Override the {@code group.id} property for the consumer factory with this value
* for this listener only.
* @return the group id.
* @since 1.3
*/
String groupId() default "";
/**
* When {@link #groupId() groupId} is not provided, use the {@link #id() id} (if
* provided) as the {@code group.id} property for the consumer. Set to false, to use
* the {@code group.id} from the consumer factory.
* @return false to disable.
* @since 1.3
*/
boolean idIsGroup() default true;
이전에는 각 청취자의 컨테이너 공장/가전 공장을 필요로; 이것들을 사용하면 하나의 팩토리 인스턴스를 사용하고 group.id
을 무효화 할 수 있습니다.
감사합니다. @Gary Russel. 나는 문서를 살펴 봤지만 명확하지가 않았다. "이전에는 각 수신기에 대한 컨테이너 팩토리/고객 팩토리가 필요 했으므로 하나의 팩토리 인스턴스를 사용하고 group.id를 재정의 할 수있었습니다." 이 설명은 나를 도왔다. – Srini