/**
* The unique identifier of the container managing for this endpoint.
* <p>If none is specified an auto-generated one is provided.
* @return the {@code id} for the container managing for this endpoint.
* @see org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry#getListenerContainer(String)
*/
String id() default "";
因此,您必须向目标服务注入 RabbitListenerEndpointRegistry 并使用它来通过 id 访问所需的 ListenerContainer .
1 回答
请找
@RabbitListener#id()
JavaDocs:因此,您必须向目标服务注入
RabbitListenerEndpointRegistry
并使用它来通过id
访问所需的ListenerContainer
.