> I have a question regarding Artemis transactions...there is a default
transaction-timeout...but I cannot figure out in which situations it is
used.

As the documentation states:

    Apache ActiveMQ Artemis has its own Resource Manager for handling the
lifespan of JTA transactions.

So, the transactions in view here are JTA transactions (aka XA or 2PC
transactions).

> Is there any way to restrict the client consuming all messages in the
queue without acknowledging messages in the reasonable time?

There is "slow consumer" detection [1] which can disconnect consumers that
do not acknowledge messages quickly enough.

> If we restrict paging settings to make a limited amount of messages to be
loaded in the memory, can it help in this situation?

I think you'd need to be more specific about what "this situation" is
exactly. The code and configuration to reproduce this situation would be a
good place to start.

> And why do these transactions last without limit?

At this point there's no evidence you're actually using a transaction.

> Maybe message processing is not considered as a transaction in Artemis?

Message processing in and of itself is not a transaction. You have to tell
the broker you want a transaction (e.g. using the JMS API) in order to get
transaction semantics.


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/slow-consumers.html#detecting-slow-consumers

On Sat, Jul 6, 2024 at 3:55 PM Alexander Milovidov <milovid...@gmail.com>
wrote:

> Hi All,
>
> I have a question regarding Artemis transactions. For example, there is a
> default transaction-timeout
> <
> https://activemq.apache.org/components/artemis/documentation/latest/transaction-config.html#resource-manager-configuration
> >
> (300
> seconds), but I cannot figure out in which situations it is used.
> We have an application which connects to the queue, consumes all available
> messages (for example 6000), and does something with all these messages
> acknowledging it one-by-one. It can last within several hours.
> All messages are held in delivery, consume address memory and it seems that
> it affects server performance. Is there any way to restrict the client
> consuming all messages in the queue without acknowledging messages in the
> reasonable time?
> If we restrict paging settings to make a limited amount of messages to be
> loaded in the memory, can it help in this situation?
> And why do these transactions last without limit? Maybe message processing
> is not considered as a transaction in Artemis?
>
> --
> Best regards,
> Alexander
>

Reply via email to