KinesisMessageDrivenChannelAdapter is not exported by IntegrationMbeansExporter

Open
#3,092 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, java, spring

Research direction

Start with IntegrationMbeansExporter.afterSingletonsInstantiated and trace how KinesisMessageDrivenChannelAdapter is created and registered. Compare that path with ConsumerEndpointCustomizer and postProcessAfterInitialization, then verify that the adapter is exported and its checkpoint operations are accessible through JMX.

Written by the indexing model from the issue text.

Description

From SO https://stackoverflow.com/questions/79489969/how-to-get-kinesismessagedrivenchanneladapter-exposed-on-jmx/79490248#79490248

Describe the issue
I'm trying to get KinesisMessageDrivenChannelAdapter exposed on JMX so that I get access to operations that manipulate the checkpoints (resetCheckpointForShardToSequenceNumber etc.). But all I can see are just the channel beans (null, error, functionRouter and one defined for StreamBridge).

I have spring-integration-jmx added, I have the @EnableIntegrationMBeanExport on my configuration and I can see the IntegrationMbeansExporter afterSingletonsInstantiated getting called but at that time the KinesisMessageDrivenChannelAdapter hasn't been created yet so it's not getting exported. Is there a different way of handling this?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Version of the framework
Spring Cloud Stream 4.0.5
Spring Integration AWS 3.0.6
Expected behavior
Screenshots

Additional context
Artem's solution is not possible since DefaultBinding.getEndpoint() is package-private. I've also tried using ConsumerEndpointCustomizer but then since KinesisMessageDrivenChannelAdapter is both instance of MessageProducer, Lifecycle and AbstractEndpoint I'm not sure the correct path is chosen in postProcessAfterInitialization.

Dominant language
Java
Stars
1.1k
Forks
646
Avg merge
2d 3h
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-cloud/spring-cloud-stream

All issues in spring-cloud/spring-cloud-stream

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.