Skip to content

Setting metadatakey on FeedEntryMessageSource using URL object is appending url to metadatakey but when Resource object is used, only metadatakey is set #3735

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

Closed
pinkeshsagar-harptec opened this issue Mar 2, 2022 · 1 comment · Fixed by #3754

Comments

@pinkeshsagar-harptec
Copy link

Using spring integration core 5.5.7 and spring integration feed 5.5.7

Expected Behavior

If user is already passing metadatakey then he is already aware about metadatakey, so both constructors of FeedEntryMessageSource should only set metdatakey, not modify it.

Current Behavior

Currently, if object of FeedEntryMessageSource created with URL, then url is appended with metadatakey and if created with second constructor which takes Resource then it is only setting metadatakey.

How has this issue affected you?
I am creating instance of FeedEntryMessageSource with both constructors. so if instance with URL failed then Resource one can be used but i am getting different metadatakey in both cases.

What other alternatives have you considered? None

Are you aware of any workarounds? No

@pinkeshsagar-harptec pinkeshsagar-harptec added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels Mar 2, 2022
@artembilan
Copy link
Member

It was like that this.metadataKey = metadataKey + "." + feedUrl; from a day first, long before we had introduced a Resource.
Since we are in major release phase at the moment, I think it is good time to make that breaking change and really fully only on the provided metadataKey only.

Feel free to contribute the fix: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc.

Thank you!

@artembilan artembilan added in: feed and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels Mar 2, 2022
@artembilan artembilan added this to the 6.0 M2 milestone Mar 2, 2022
@artembilan artembilan self-assigned this Mar 18, 2022
artembilan added a commit to artembilan/spring-integration that referenced this issue Mar 18, 2022
Fixes spring-projects#3735

The `FeedEntryMessageSource` adds an url to the provided `metadataKey`
making it incompatible when we provide a `Resource`-based configuration.

* Remove adding of the url to the `metadataKey` making it rely only
on the provided value
* Remove internal `Comparator` for entries in favor of `Comparator.comparing()`
feature
* Improve some internal logic of the `PropertiesPersistingMetadataStore`
when it emits a false warning: cannot create dirs, but they are present
* Improve `feed.adoc`
artembilan added a commit to artembilan/spring-integration that referenced this issue Mar 18, 2022
Fixes spring-projects#3735

The `FeedEntryMessageSource` adds an url to the provided `metadataKey`
making it incompatible when we provide a `Resource`-based configuration.

* Remove adding of the url to the `metadataKey` making it rely only
on the provided value
* Remove internal `Comparator` for entries in favor of `Comparator.comparing()`
feature
* Improve some internal logic of the `PropertiesPersistingMetadataStore`
when it emits a false warning: cannot create dirs, but they are present
* Improve `feed.adoc`
artembilan added a commit to artembilan/spring-integration that referenced this issue Mar 22, 2022
Fixes spring-projects#3735

The `FeedEntryMessageSource` adds an url to the provided `metadataKey`
making it incompatible when we provide a `Resource`-based configuration.

* Remove adding of the url to the `metadataKey` making it rely only
on the provided value
* Remove internal `Comparator` for entries in favor of `Comparator.comparing()`
feature
* Improve some internal logic of the `PropertiesPersistingMetadataStore`
when it emits a false warning: cannot create dirs, but they are present
* Improve `feed.adoc`
garyrussell pushed a commit that referenced this issue Mar 22, 2022
Fixes #3735

The `FeedEntryMessageSource` adds an url to the provided `metadataKey`
making it incompatible when we provide a `Resource`-based configuration.

* Remove adding of the url to the `metadataKey` making it rely only
on the provided value
* Remove internal `Comparator` for entries in favor of `Comparator.comparing()`
feature
* Improve some internal logic of the `PropertiesPersistingMetadataStore`
when it emits a false warning: cannot create dirs, but they are present
* Improve `feed.adoc`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants