[
https://issues.apache.org/jira/browse/ARTEMIS-5956?focusedWorklogId=1010380&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1010380
]
ASF GitHub Bot logged work on ARTEMIS-5956:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 19/Mar/26 15:41
Start Date: 19/Mar/26 15:41
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #6300:
URL: https://github.com/apache/artemis/pull/6300#discussion_r2960920994
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java:
##########
@@ -52,7 +52,9 @@ private void doIt() {
}
public TransientQueueManagerImpl(ActiveMQServer server, SimpleString
queueName) {
- super(server.getExecutorFactory().getExecutor());
+ /* We cannot use a separate executor to delete transient queues as that
would
+ * introduce races on the ServerSessionImpl::TempQueueCleaner. */
+ super();
Review Comment:
even though I'm using a single executor here, it was not possible to
completely avoid the need to retry the execution.
the consumer.close could be happening after removeAddress is triggered. So,
I'm just retrying up to 5 times. (1 time should been enough).
I don't think we should allow configuration for this max-retry.
Issue Time Tracking
-------------------
Worklog Id: (was: 1010380)
Time Spent: 1h 40m (was: 1.5h)
> Temporary Addresses may leak when consumer is not yet closed
> ------------------------------------------------------------
>
> Key: ARTEMIS-5956
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5956
> Project: Artemis
> Issue Type: Bug
> Reporter: Clebert Suconic
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> say you create a temporary destination, and close the connection with the
> consumer open.
> Depending on pending executions the destination may leak:
> {code:java}
> try (Connection connection = createConnection()) {
> Session session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
> Topic temporaryTopic = session.createTemporaryTopic();
> MessageProducer producer = session.createProducer(temporaryTopic);
> MessageConsumer consumer =
> session.createSharedConsumer(temporaryTopic, "mySub");
> connection.start();
> temporarytopicName = temporaryTopic.getTopicName();
> producer.send(session.createMessage());
> assertNotNull(consumer.receive(5000));
> }
> Wait.assertTrue(() ->
> server.getAddressInfo(SimpleString.of(temporarytopicName)) == null, 5000,
> 100);
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]