2017-10-27 2 views

답변

2

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.0 containerGroup 변경되었습니다 ... 카프카 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을 무효화 할 수 있습니다.

+0

감사합니다. @Gary Russel. 나는 문서를 살펴 봤지만 명확하지가 않았다. "이전에는 각 수신기에 대한 컨테이너 팩토리/고객 팩토리가 필요 했으므로 하나의 팩토리 인스턴스를 사용하고 group.id를 재정의 할 수있었습니다." 이 설명은 나를 도왔다. – Srini

관련 문제