Skip to content

getUnregisteredListenerContainer return null #3319

@aliciz

Description

@aliciz

version: 3.1.1

I am encountering an issue where the getUnregisteredListenerContainer method from the KafkaListenerEndpointRegistry returns null. This occurs in the scenario where I am not using the @KafkaListener annotation but instead, I am manually registering custom containers.

public void pause(String id) {
        MessageListenerContainer listenerContainer = registry.getUnregisteredListenerContainer(id);
        if (listenerContainer == null) {
            log.warn("listenerContainer not exists id:{}", id);
            return;
        }
        listenerContainer.pause();
}

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions