[
https://issues.apache.org/jira/browse/CAMEL-26027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130522#comment-18130522
]
Claus Ibsen commented on CAMEL-26027:
-------------------------------------
The fix is in PR [#28311|https://github.com/apache/camel/pull/28311]: each send
builds its request body in its own {{TelegramBodyPublisher}}. It has the
{{port/camel-4.22.x}} and {{port/camel-4.18.x}} labels for the backports.
_Claude Code on behalf of davsclaus_
> camel-telegram - concurrent sends through one endpoint mix up the parts of
> their requests
> -----------------------------------------------------------------------------------------
>
> Key: CAMEL-26027
> URL: https://issues.apache.org/jira/browse/CAMEL-26027
> Project: Camel
> Issue Type: Bug
> Components: camel-telegram
> Affects Versions: 4.18.0, 4.22.0, 4.23.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.18.6, 4.22.3, 4.24.0
>
>
> Each message handler of the telegram producer keeps one
> {{TelegramBodyPublisher}} ({{TelegramMessageHandler}}, main 07d2e7a987bc,
> lines 34 and 47), which every send of that message type fills ({{addBody}})
> and empties when it serializes the request ({{TelegramBodyPublisher}}, line
> 152). The producer is called from several threads at once when a route has
> concurrent consumers or a parallel split, and then the sends share the parts
> of their requests: a request carries the messages of several sends, to the
> chat of one of them, and another request goes out empty.
> Checked on 4.24.0-SNAPSHOT with {{camel run}} against a fake Bot API: 300
> text messages with their own chat ids, sent through one endpoint by a seda
> consumer with {{concurrentConsumers=20}}. 10 requests carried the messages of
> several chats (one of them those of chat-3, chat-4 and chat-9), 46 requests
> were empty, and 6 sends failed.
> *Proposed change*: build the body of each request in its own
> {{TelegramBodyPublisher}}.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)