davsclaus commented on code in PR #26041:
URL: https://github.com/apache/camel/pull/26041#discussion_r3916010587


##########
components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java:
##########
@@ -227,14 +227,15 @@ public PollingConsumer createPollingConsumer() throws 
Exception {
     public BlockingQueue<Exchange> getQueue() {
         lock.lock();
         try {
-            if (queue == null) {
+            if (queue == null || (getComponent() != null && (ref == null || 
!ref.isReferenced(this)))) {

Review Comment:
   Non-blocking observation: `getQueue()` now evaluates 
`!ref.isReferenced(this)` on every call, which acquires the `QueueReference` 
lock and does a linear scan over its endpoints list — where before this was a 
pure `queue == null` field check.
   
   This is not on the per-message producer hot path 
(`SedaProducer.addToQueue()` uses `getQueueReference()`), only per consumer 
`doRun()` and per polling-consumer `receive()`, so the overhead is negligible 
in practice. Just noting it — no change requested.



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