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

Urmila Unni commented on CAMEL-26135:
-------------------------------------

Hi [~davsclaus] , I’d like to work on this one. The component docs say a 
consumer gets each application event of the Spring ApplicationContext, so I 
plan to keep that and only fix the CamelEvents: a CamelEvent sent to 
spring-event:foo goes only to the consumers of spring-event:foo. Does that 
sound right, or should the consumers also stop getting the other Spring events?

> 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)

Reply via email to