gnodet-bot commented on code in PR #30946:
URL: https://github.com/apache/camel/pull/30946#discussion_r4717718095


##########
components/camel-spring-parent/camel-spring/src/main/java/org/apache/camel/component/event/EventEndpoint.java:
##########
@@ -61,7 +61,10 @@ public class EventEndpoint extends DefaultEndpoint 
implements ApplicationContext
     private LoadBalancer loadBalancer;
     private ApplicationContext applicationContext;
 
-    @UriPath(description = "Name of endpoint")
+    @UriPath(description = "The name of the endpoint. The producer publishes a 
body that is not an ApplicationEvent as a"
+                           + " CamelEvent, which only the consumers of 
endpoints with the same name receive. Every other"
+                           + " ApplicationEvent of the ApplicationContext, 
also one that a producer publishes, goes to the"
+                           + " consumers of all spring-event endpoints, 
whatever their name.")

Review Comment:
   💡 **Doc clarity (low):** Two sentences exceed 25 words and use nested 
relative clauses that are hard to parse at a glance. The phrase "publishes a 
body that is not an ApplicationEvent as a CamelEvent" reads ambiguously (is "as 
a CamelEvent" modifying "publishes" or "ApplicationEvent"?). Consider splitting 
into shorter, direct sentences:
   
   ```suggestion
       @UriPath(description = "The name of the endpoint."
                              + " When a producer sends a body that is not a 
Spring ApplicationEvent, Camel wraps it in a CamelEvent."
                              + " Only consumers of endpoints with the same 
name receive that CamelEvent."
                              + " Any Spring ApplicationEvent — including one 
published directly by a producer — goes to consumers of all spring-event 
endpoints, regardless of their name.")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to