[
https://issues.apache.org/jira/browse/CAMEL-26135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133054#comment-18133054
]
Urmila Unni commented on CAMEL-26135:
-------------------------------------
I opened a PR: https://github.com/apache/camel/pull/28576
A CamelEvent sent by a spring-event producer now only goes to the consumers of
the endpoint with the same name. Other application events still go to every
consumer, as the docs say. Happy to change this if a different behavior is
wanted.
> camel-spring - the spring-event endpoint name is ignored, so every consumer
> gets the events of all spring-event endpoints and all Spring context events
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26135
> URL: https://issues.apache.org/jira/browse/CAMEL-26135
> Project: Camel
> Issue Type: Bug
> Components: camel-spring
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of mapstruct, robotframework,
> citrus and spring-event (CAMEL-24961, PR #28417).
> h4. 1. The endpoint name is ignored
> {{EventComponent.onApplicationEvent}} (main 2a465aa4814c, lines 87-95)
> broadcasts every ApplicationEvent to all the {{EventEndpoint}}s in use, and
> {{EventEndpoint.onApplicationEvent}} (line 96) does not look at its name. So
> a consumer on {{spring-event:bar}} received the event sent to
> {{spring-event:foo}}, and every consumer also gets all the Spring context
> events (refresh, start, close...). Checked on 4.24.0-SNAPSHOT in a
> GenericApplicationContext with a SpringCamelContext (camel-spring-xml).
> Proposed: carry the endpoint name in the {{CamelEvent}} and deliver a
> CamelEvent only to the consumers of that name, or document that the name is
> not used for routing.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)