-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INT-3147 Twitter/Feed expose MessageSources as beans #910
Conversation
This branch has to be rebased and polished |
final String channelAdapterId = this.resolveId(element, sourceBuilder.getRawBeanDefinition(), parserContext); | ||
final String sourceBeanName = channelAdapterId + ".source"; | ||
|
||
parserContext.getRegistry().registerBeanDefinition(sourceBeanName, sourceBuilder.getBeanDefinition()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like should be a common case for all MessageSource
s with all inbound-channel-adapter
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This crossed my mind. @garyrussell and I chatted about the current way JMX support is provided (MessageSourceMetrics) and he mentioned that an overhaul would be nice, preferring a more direct approach. Although this would admittedly be a lot of work.
I am certainly not keen having to make this explicit call to resolveId(). Would be nice if that was already available somehow - I did not want to break anything though :-)
Regarding
WDYT? |
* In the Twitter Inbound Channel Adapter Parser, expose the MessageSource as top-level bean rather than as inner bean * Add tests Jira: https://jira.springsource.org/browse/INT-3147
* In the Feed Inbound Channel Adapter Parser, expose the MessageSource as top-level bean rather than as inner bean * Add test Jira: https://jira.springsource.org/browse/INT-3147
* Add documentation to Twitter chapter * Add documentation to Feed chapter
Rebased. |
@artembilan I think I would rather go down the route of exposing a property metadata-key, so users can define their own and if they don't define it, the logic falls back to the one above. But that would be a new Jira. This PR simply addresses the bug (very unlikely the original implementor assumed that (inner bean) is used for the key rather than the component id). I did not modify any existing logic. That being said, the key does change - therefore need to make a mental note, to add this to the migration guide once merged. |
OK. |
Any updates on this? @garyrussell @artembilan Started working on https://jira.springsource.org/browse/INT-1941 Need this PR merged in order to start writing some JMX tests. My branch: https://github.com/ghillert/spring-integration/tree/INT-1941 |
I am a bit tied up right now; will try to look this afternoon. |
Hi there!
Of course, it may be out of this PR. |
My 2c for this PR...
And...
|
Hi @ghillert are you going to wrap this up, or do you want one of us to? Thanks. |
@garyrussell Will try later today and over the weekend. |
Superseded by #928 |
Jira: https://jira.springsource.org/browse/INT-3147