You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/09/26 09:02:00 UTC

[jira] [Commented] (CAMEL-18549) Dynamic router component should add filters to a map (by filter id) instead of a list to prevent multiple additions of the same filter.

    [ https://issues.apache.org/jira/browse/CAMEL-18549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17609379#comment-17609379 ] 

Claus Ibsen commented on CAMEL-18549:
-------------------------------------

Can you backport to 3.18.x and 3.14.x

> Dynamic router component should add filters to a map (by filter id) instead of a list to prevent multiple additions of the same filter.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-18549
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18549
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Steve Storck
>            Assignee: Steve Storck
>            Priority: Minor
>             Fix For: 3.19.0
>
>
> Adding routing filters to the dynamic router processor can lead to having multiple entries of essentially the same filter.  Filters are identified by ID, and the processor accumulates filters in a list, so no uniqueness (by ID) is maintained.  If a component starts, and then restarts any number of times, it might register the same filter each time, if it registers with the dynamic router upon startup.  The filters need to be accumulated as a map, where the key is the filter ID.  Filters will be overridden if a filter by that ID exists when a component registers its filter.  Therefore, it is the responsibility of the user of the dynamic router component to coordinate filter registration and the IDs that are used.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)