Skip to content
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: (3167,3173,1941) Improve MetadataStore #928

Closed
wants to merge 4 commits into from

Conversation

artembilan
Copy link
Member

Previously, MetadataStore couldn't be configured for Twitter Adapters, only global one.
The metadataKey was generated automatically with 'difficult' value

  • Register all MessageSource for SourcePollingChannelAdapter
    as beans with id based on adapter id and prefix '.source' (INT-3147)
  • Polishing parser to get rid of explicit MessageSource beans. (INT-3147)
  • Make Feed and Twitter adapters id attribute as required -
    now it presents a metadataKey for MetadataStore (INT-3147)
  • Add to Twitter adapters a reference attribute for MetadataStore (INT-3173)
  • Add Twitter adapters poll-skip-period attribute (INT-3167)
  • Add and implement MetadataStore#remove (INT-1941)
  • Make MetadataStore as @ManagedResource (INT-1941)
  • Polishing tests

JIRAs:
https://jira.springsource.org/browse/INT-3147
https://jira.springsource.org/browse/INT-3167
https://jira.springsource.org/browse/INT-3173
https://jira.springsource.org/browse/INT-1941

@@ -82,17 +83,19 @@
* If the feed URL has a protocol other than http*, consider providing a custom implementation of the
* {@link FeedFetcher} via the alternate constructor.
*/
public FeedEntryMessageSource(URL feedUrl) {
this(feedUrl, new HttpURLFeedFetcher(HashMapFeedInfoCache.getInstance()));
public FeedEntryMessageSource(URL feedUrl, String metadataKey) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs migration guide entry - constructor change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Sorry: forgot to mark is as breaking change
And there is need to add more docs.
I don't know maybe @ghillert will take care of it in the https://jira.springsource.org/browse/INT-3148

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we also need to warn that the existing metadata will be invalid.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! The Migration Guide note.

@artembilan
Copy link
Member Author

Pushed

@artembilan
Copy link
Member Author

Pushed polishing after rebase.
There is still need docs

@garyrussell
Copy link
Contributor

Please move package ...integration.store.metadata to ...integration.metadata.

See https://jira.springsource.org/browse/INT-3191

@artembilan
Copy link
Member Author

Np. Will be done.
Thanks

@garyrussell
Copy link
Contributor

I was going to issue a PR, but realized it would impact this one.

Artem Bilan added 4 commits November 4, 2013 09:20
Previously, `MetadataStore` couldn't be configured for Twitter Adapters
- only global one.
The `metadataKey` was generated automatically with 'difficult' value

* Register all `MessageSource` for `SourcePollingChannelAdapter`
as beans with id based on adapter id and prefix '.source' (INT-3147)
* Polishing parser to get rid of explicit `MessageSource` beans. (INT-3147)
* Make Feed and Twitter adapters `id` attribute as required -
now it presents a `metadataKey` for `MetadataStore` (INT-3147)
* Add to Twitter adapters a reference attribute for `MetadataStore` (INT-3173)
* Add Twitter adapters `poll-skip-period` attribute (INT-3167)
* Add and implement `MetadataStore#remove` (INT-1941)
* Make `MetadataStore` as `@ManagedResource` (INT-1941)
* Polishing tests

JIRAs:
https://jira.springsource.org/browse/INT-3147
https://jira.springsource.org/browse/INT-3167
https://jira.springsource.org/browse/INT-3173
https://jira.springsource.org/browse/INT-1941
* add domain suffix to `metadataKey`
* change contract of `MetadataStore.remove`
* remove timeout window from `AbstractTwitterMessageSource`
* polishing and fix `SearchReceivingMessageSourceWithRedisTests`
@artembilan
Copy link
Member Author

Pushed fix for 'metadata' package tangle

* return the previous value associated with <tt>key</tt>, or
* <tt>null</tt> if there was no mapping for <tt>key</tt>.
*/
@ManagedAttribute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be @ManagedOperations

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Thanks
Will be pushed after other feedbacks

@garyrussell
Copy link
Contributor

Building now; will merge after; doc polish here

garyrussell@1c92c61

Let me know if you have issues with any of the polish

@garyrussell
Copy link
Contributor

Merged

@garyrussell garyrussell closed this Nov 4, 2013
@artembilan artembilan deleted the INT-3147 branch December 16, 2013 09:24
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.

None yet

2 participants