[
https://issues.apache.org/jira/browse/ARTEMIS-5483?focusedWorklogId=1004682&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1004682
]
ASF GitHub Bot logged work on ARTEMIS-5483:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 11/Feb/26 19:48
Start Date: 11/Feb/26 19:48
Worklog Time Spent: 10m
Work Description: jbertram commented on PR #5689:
URL: https://github.com/apache/artemis/pull/5689#issuecomment-3886674849
After thinking about this for awhile I believe this problem would be better
solved with a new identifier that could be used in a consumer's
[filter](https://artemis.apache.org/components/artemis/documentation/latest/filter-expressions.html#filter-expressions).
Currently we have `AMQSize`, but that works on the message's "encoded" size
(see
[here](https://github.com/apache/artemis/blob/a7ac3ab386b4e4cdc58e1716f26c5ae288e46508/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java#L178))
which doesn't include the body of a large message. Adding something like
`AMQFullSize` that used
`org.apache.activemq.artemis.api.core.Message#getWholeMessageSize` would solve
this problem. Other benefits include:
- The message wouldn't even be sent across the wire. This would save
bandwidth & time.
- It would work on all protocols & clients that support filtering instead of
only on the Core JMS client.
- It would allow other consumers on the queue to get the message without
having to wait for it to be rejected by another consumer.
Would you be interested in modifying your PR to implement this?
Issue Time Tracking
-------------------
Worklog Id: (was: 1004682)
Time Spent: 20m (was: 10m)
> Provide option to abort consumption of large javax.jms.TextMessage on client
> side
> ---------------------------------------------------------------------------------
>
> Key: ARTEMIS-5483
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5483
> Project: Artemis
> Issue Type: Improvement
> Components: JMS
> Reporter: Alexej Timonin
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> This improvement request comes from thread in [email protected]:
> Artemis JMS client: Can I stream body of ActiveMQTextMessage?
> https://lists.apache.org/thread/t2bmc8g6tod1wlqz062g46gpwv52v2y5
> Provide an option for clients using JMS api through artemis-jakarta-client to
> detect when a javax.jms.TextMessage is so large it would crash the client
> because of out-of-memory errors.
> As it is now, a buggy producer can send a text message (type 3) so large that
> it would crash the consumer because the current implementation of JMS
> consumer reads whole text message into memory.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]