Skip to content

Support distinct if multiple ES for same type for getSecondaryResources() #3103

@csviri

Description

@csviri

If there are multiple event sources for the same Kind, Context.getSecondaryResources returns a stream of the resources. If there are multiple event sources that return an overlap, thus the same resources, we could provide a filter to make sure the resources are distinct. Now we can also compare the versions and return the one with the higher resource version.

Maybe we could also just provide a special filter, like:
see also: https://www.baeldung.com/java-streams-distinct-by

However we probably don't want to apply this by default because of performance reasons.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions