[jira] [Commented] (AMQ-9483) Non Daemon Connection Keeping JVM alive when combined with optimizedAckScheduledAckInterval

2024-04-26 Thread Matthew Washburn (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-9483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841283#comment-17841283
 ] 

Matthew Washburn commented on AMQ-9483:
---

Some unit tests need to be updated with the new constructor arg. If you are 
good with the approach for detecting if we should be daemon I will update them. 

> Non Daemon Connection Keeping JVM alive when combined with 
> optimizedAckScheduledAckInterval
> ---
>
> Key: AMQ-9483
> URL: https://issues.apache.org/jira/browse/AMQ-9483
> Project: ActiveMQ Classic
>  Issue Type: Bug
>  Components: JMS client
>Affects Versions: 5.18.4
>Reporter: Matthew Washburn
>Priority: Major
> Attachments: 
> 0001-make-sure-the-executor-service-for-deliveryingAcknow.patch, 796.patch
>
>
> The thread used to send ack unacked messages when using the 
> optimizedAckScheduledAckInterval is not daemon even if the connection is set 
> to daemon. This is probably advantageous as you would not want a queue or 
> durable topic consumer to shutdown before it has finished acking a message 
> causing it to be redelivered on restart. On the other hand, it means that if 
> the optimized ack scheduler ever kicks in on a daemon connection the JVM will 
> never exit. Also the thread isn't uniquely named so it's hard to track down.
>  
> I'm not sure how to get in the situation where there are unacked messages 
> that are acked by the timer so I'm not sure how to create a simple repo 
> script but the attached patch fixes my application. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (AMQ-9483) Non Daemon Connection Keeping JVM alive when combined with optimizedAckScheduledAckInterval

2024-04-25 Thread Matthew Washburn (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-9483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17841001#comment-17841001
 ] 

Matthew Washburn commented on AMQ-9483:
---

I attached another patch. I'm not sure if this is the correct way to get the 
daemon property in FailoverTransportFactory, but this is the correct thread 
pool to change to fix issue 796. That 
executor is only used to handle errors and so it might never get any work 
assigned to it so it never creates any threads. And even if it did, it 
specifies a time out of 5 seconds, so if you reconnect interval was greater 
than 5 it will still exit. 

> Non Daemon Connection Keeping JVM alive when combined with 
> optimizedAckScheduledAckInterval
> ---
>
> Key: AMQ-9483
> URL: https://issues.apache.org/jira/browse/AMQ-9483
> Project: ActiveMQ Classic
>  Issue Type: Bug
>  Components: JMS client
>Affects Versions: 5.18.4
>Reporter: Matthew Washburn
>Priority: Major
> Attachments: 
> 0001-make-sure-the-executor-service-for-deliveryingAcknow.patch, 796.patch
>
>
> The thread used to send ack unacked messages when using the 
> optimizedAckScheduledAckInterval is not daemon even if the connection is set 
> to daemon. This is probably advantageous as you would not want a queue or 
> durable topic consumer to shutdown before it has finished acking a message 
> causing it to be redelivered on restart. On the other hand, it means that if 
> the optimized ack scheduler ever kicks in on a daemon connection the JVM will 
> never exit. Also the thread isn't uniquely named so it's hard to track down.
>  
> I'm not sure how to get in the situation where there are unacked messages 
> that are acked by the timer so I'm not sure how to create a simple repo 
> script but the attached patch fixes my application. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (AMQ-9483) Non Daemon Connection Keeping JVM alive when combined with optimizedAckScheduledAckInterval

2024-04-25 Thread Matthew Washburn (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-9483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17840967#comment-17840967
 ] 

Matthew Washburn commented on AMQ-9483:
---

Pretty sure 796 is still broken not sure why it was closed, At least as of 
5.18.3. I can fix that too while I'm at it, there was discussion of some unit 
tests in there where those ever created?

> Non Daemon Connection Keeping JVM alive when combined with 
> optimizedAckScheduledAckInterval
> ---
>
> Key: AMQ-9483
> URL: https://issues.apache.org/jira/browse/AMQ-9483
> Project: ActiveMQ Classic
>  Issue Type: Bug
>  Components: JMS client
>Affects Versions: 5.18.4
>Reporter: Matthew Washburn
>Priority: Major
> Attachments: 
> 0001-make-sure-the-executor-service-for-deliveryingAcknow.patch
>
>
> The thread used to send ack unacked messages when using the 
> optimizedAckScheduledAckInterval is not daemon even if the connection is set 
> to daemon. This is probably advantageous as you would not want a queue or 
> durable topic consumer to shutdown before it has finished acking a message 
> causing it to be redelivered on restart. On the other hand, it means that if 
> the optimized ack scheduler ever kicks in on a daemon connection the JVM will 
> never exit. Also the thread isn't uniquely named so it's hard to track down.
>  
> I'm not sure how to get in the situation where there are unacked messages 
> that are acked by the timer so I'm not sure how to create a simple repo 
> script but the attached patch fixes my application. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (AMQ-9483) Non Daemon Connection Keeping JVM alive when combined with optimizedAckScheduledAckInterval

2024-04-21 Thread Christopher L. Shannon (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-9483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17839395#comment-17839395
 ] 

Christopher L. Shannon commented on AMQ-9483:
-

This is something that would need to be carefully considered and tested to make 
sure changing something like this does not re-introduce this problem 
https://issues.apache.org/jira/browse/AMQ-796

At first glance I think a change like this might be ok since AMQ-796 appeared 
to make the change in ActiveMQConnection here: 
[https://github.com/apache/activemq/blob/6084867b26619ab614bc117667a32649def5887a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java#L238]

but it needs to be looked at more

 

> Non Daemon Connection Keeping JVM alive when combined with 
> optimizedAckScheduledAckInterval
> ---
>
> Key: AMQ-9483
> URL: https://issues.apache.org/jira/browse/AMQ-9483
> Project: ActiveMQ Classic
>  Issue Type: Bug
>  Components: JMS client
>Affects Versions: 5.18.4
>Reporter: Matthew Washburn
>Priority: Major
> Attachments: 
> 0001-make-sure-the-executor-service-for-deliveryingAcknow.patch
>
>
> The thread used to send ack unacked messages when using the 
> optimizedAckScheduledAckInterval is not daemon even if the connection is set 
> to daemon. This is probably advantageous as you would not want a queue or 
> durable topic consumer to shutdown before it has finished acking a message 
> causing it to be redelivered on restart. On the other hand, it means that if 
> the optimized ack scheduler ever kicks in on a daemon connection the JVM will 
> never exit. Also the thread isn't uniquely named so it's hard to track down.
>  
> I'm not sure how to get in the situation where there are unacked messages 
> that are acked by the timer so I'm not sure how to create a simple repo 
> script but the attached patch fixes my application. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)