Skip to content

How to pause/resume on Listener ? #650

@V-Rajasekar

Description

@V-Rajasekar

Can you please share a code snippet how to invoke the pause( )/resume( ) on the listener instead on a consumer as advised in spring-kafka reference doc as it is not always thread-safe.

I tried injecting or Autowiring the listener in the kafka-consumer but it lead to below cyclic error

The dependencies of some of the beans in the application context form a cycle: because
┌─────┐
| myListener defined in class path resource [no/demo/services/configuration/KafkaConfiguration.class]
↑ ↓
| myMessageConsumer (field org.springframework.kafka.listener.KafkaMessageListenerContainer no.demo.services.MyMessageConsumer.myListener)
└─────┘

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions