Skip to content

Make MetadataStores dynamically resettable on a per component bassis [INT-1941] #5922

Closed
@spring-operator

Description

@spring-operator

Gunnar Hillert opened INT-1941 and commented

While working with the Twitter adapter, I was playing around with starting + stopping the Twitter search using the Control Bus which worked great. In that regard I thought it would be a nice to demonstrate to also clear my local Tweet cache. This then let me to investigate the "SimpleMetadataStore" a bit closer.

Just for readers of this issue:

In order to prevent message duplication for various adapters (incl. Twitter) Spring Integration provides the concept of Metadata Stores for storing various types of metadata (org.springframework.integration.store.MetadataStore and org.springframework.integration.store.PropertiesPersistingMetadataStore)

It may be worthwhile to be able to make MetadataStores resettable (e.g. On a per component basis). E.g. the Twitter adapter stores the last Tweet Id in the store to prevent processing of Tweets with lower Id in order to prevent duplication. 2 issues - The map that backs MetaData stores is private and not easily extendable.

Also, the key used to store the Twitter "since_id"/"lastProcessedId" quite cryptic, e.g.: "twitter:search-inbound-channel-adapter.(inner bean).twitter-anonymous"

Lastly as an additional piece of information, I think the lastProcessedId is also cached within the Twitter adapter itself.

See also for reference: https://jira.springsource.org/browse/INT-1527


Affects: 2.0.4

Issue Links:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions