[
https://issues.apache.org/jira/browse/CAMEL-25969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131005#comment-18131005
]
Claus Ibsen commented on CAMEL-25969:
-------------------------------------
Fix in https://github.com/apache/camel/pull/28363
_Claude Code on behalf of davsclaus_
> camel-stub - without a consumer the stub queue fills up, and the producer
> fails with Queue full after 1000 messages
> -------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-25969
> URL: https://issues.apache.org/jira/browse/CAMEL-25969
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 4.18.0, 4.22.0, 4.23.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> With no route that consumes from it, a stub endpoint keeps every message in
> its queue. {{StubProducer}} sends the exchange InOnly when there are no
> consumers (main e6885df7894d, lines 46-49), and the seda producer it extends
> queues it. The queue is never drained. After 1000 messages, the default size,
> the producer fails with {{IllegalStateException: Queue full}}, because
> blockWhenFull and discardWhenFull are false (SedaProducer, line 315).
> That is the common case of {{camel run --stub}}: a stubbed producer such as
> {{to: jms:queue:orders}} has no consumer, so a route that sends more than
> 1000 messages fails, and every message is kept in memory until then.
> Checked on 4.24.0-SNAPSHOT with {{camel run}}: a loop that sends 1001
> messages to {{stub:nobody}} fails with {{IllegalStateException: Queue full}}.
> *Proposed change*: when the stub endpoint has no consumer, drop the message
> after it is sent, or keep only a bounded number of them for browsing.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)