Skip to content

Conversation

@Flamme1004K
Copy link

I'm submitting a PR for issue #4230. Although the KafkaBackoffAwareMessageListenerAdapter class delegates to RecordMessagingMessageListenerAdapter, it was observed that metrics were being recorded incorrectly because it wasn't adding metrics despite RecordMessagingMessageListenerAdapter.

To resolve this, I modified the code to set isListenerAdapterObservationAware to true even when it's a KafkaBackoffAwareMessageListenerAdapter. Additionally, when adding observations, I ensured that if the KafkaBackoffAwareMessageListenerAdapter class delegates to RecordMessagingMessageListenerAdapter, it also adds the metrics.

Thank you for your attention.

@Flamme1004K Flamme1004K changed the title Enhance listener observation handling with additional adapter support GH-4230: Enhance listener observation handling with additional adapter support Jan 10, 2026
@victorpasqualino
Copy link

I did something very similar, with a few differences: #4240

@Flamme1004K
Copy link
Author

Flamme1004K commented Jan 11, 2026

@victorpasqualino good Idea!

I got inspired by your code and tried refactoring it. Can you take a look?

@victorpasqualino
Copy link

@victorpasqualino good Idea!

I got inspired by your code and tried refactoring it. Can you take a look?

* [211c631](https://github.com/spring-projects/spring-kafka/pull/4238/commits/211c6313eee43311ec5cf21e3f1287b915f1fc48)

Looks good to me. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants