[
https://issues.apache.org/jira/browse/ARTEMIS-5956?focusedWorklogId=1010150&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1010150
]
ASF GitHub Bot logged work on ARTEMIS-5956:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 18/Mar/26 18:48
Start Date: 18/Mar/26 18:48
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #6300:
URL: https://github.com/apache/artemis/pull/6300#discussion_r2955542355
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java:
##########
@@ -1197,7 +1216,7 @@ private void run() {
try {
AddressInfo a = server.getAddressInfo(resourceName);
if (a != null && a.isTemporary()) {
- server.removeAddressInfo(resourceName, null);
+ server.removeAddressInfo(resourceName, null, true);
Review Comment:
this is the actual fix
Issue Time Tracking
-------------------
Worklog Id: (was: 1010150)
Time Spent: 0.5h (was: 20m)
> 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: 0.5h
> 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]