You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/11/19 21:58:00 UTC

[jira] [Work logged] (AMQ-9255) Messages submitted via http(s) transport don't dead letter after TTL is exceeded

     [ https://issues.apache.org/jira/browse/AMQ-9255?focusedWorklogId=891221&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-891221 ]

ASF GitHub Bot logged work on AMQ-9255:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Nov/23 21:57
            Start Date: 19/Nov/23 21:57
    Worklog Time Spent: 10m 
      Work Description: yijut2 commented on PR #1051:
URL: https://github.com/apache/activemq/pull/1051#issuecomment-1817990286

   Hi, 
   
   I met an issue when using Nondex, a tool for detecting and debugging wrong assumptions on under-determined Java APIs. (https://github.com/TestingResearchIllinois/NonDex) When I run the detect flakiness command on the AMQ9255Test, sometimes I will get this error:
   `[ERROR] Errors: 
   [ERROR]   AMQ9255Test.testExpiredMessages:146 » JMS Could not post command: MessageAck {commandId = 5, responseRequired = false, ackType = 2, consumerId = ID:fa23-cs527-073.cs.illinois.edu-37869-1700429033032-5:2:1:1, firstMessageId = ID:fa23-cs527-073.cs.illinois.edu-37869-1700429033032-5:1:1:1:1, lastMessageId = ID:fa23-cs527-073.cs.illinois.edu-37869-1700429033032-5:1:1:1:1, destination = queue://ActiveMQ.DLQ, transactionId = null, messageCount = 1, poisonCause = null} due to: org.apache.http.NoHttpResponseException: localhost:8161 failed to respond
   [INFO] 
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0`
   
   This error won't appear everytime, but just sometimes. Did you have an idea where the problem is? Thank you in advance.




Issue Time Tracking
-------------------

    Worklog Id:     (was: 891221)
    Time Spent: 0.5h  (was: 20m)

> Messages submitted via http(s) transport don't dead letter after TTL is exceeded
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-9255
>                 URL: https://issues.apache.org/jira/browse/AMQ-9255
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.16.6
>         Environment: Tested on 5.16.6, Windows client, Windows & Linux servers. 
> openjdk version "1.8.0_322"
> OpenJDK Runtime Environment (Temurin)(build 1.8.0_322-b06)
>            Reporter: Paul McCulloch
>            Assignee: Christopher L. Shannon
>            Priority: Major
>             Fix For: 6.0.0, 5.18.3
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When a persistent messages is submitted to a queue, with a time to live specified, it should be removed from the queue and (in the default configuration) moved to the DLQ. 
> This is the case with the web console, and with a trivial Java client using the openwire transport (specified using a "tcp://" broker URL when creating ActiveMQConnectionFactory.
> If an http/https url is specified this doesn't behave correctly. When the TTL is exceeded the message seems to go into a limbo state. It doesn't get delivered to consumers, but also doesn't go to the DLQ (as determined via the web console).
> The server logs an error when using the web console (stack trace at end):
> java.lang.NullPointerException
>     at org.apache.activemq.command.Message.canProcessAsExpired(Message.java:865)
> I believe the cause of the web console issue (and perhaps the whole DLQ thing) is that a transient field, processAsExpired, was added to org.apache.activemq.command.Message, but Message doesn't implement TransientInitializer.
> The OpenWire transport doesn't suffer from this as its command unmarshaling code uses a constructor to initialize the ActiveMQTextMessage  - so the transient field isn't null.
>  
> Stack Trace:
> 2023-04-30 06:38:00,583 | ERROR | org.apache.activemq.broker.region.Queue | Problem retrieving message for browse | ActiveMQ BrokerService[localhost] Task-2
> java.lang.NullPointerException
>     at org.apache.activemq.command.Message.canProcessAsExpired(Message.java:865)
>     at org.apache.activemq.broker.region.IndirectMessageReference.canProcessAsExpired(IndirectMessageReference.java:210)
>     at org.apache.activemq.broker.region.RegionBroker.isExpired(RegionBroker.java:749)
>     at org.apache.activemq.broker.BrokerFilter.isExpired(BrokerFilter.java:309)
>     at org.apache.activemq.broker.BrokerFilter.isExpired(BrokerFilter.java:309)
>     at org.apache.activemq.broker.BrokerFilter.isExpired(BrokerFilter.java:309)
>     at org.apache.activemq.broker.BrokerFilter.isExpired(BrokerFilter.java:309)
>     at org.apache.activemq.broker.BrokerFilter.isExpired(BrokerFilter.java:309)
>     at org.apache.activemq.broker.region.Queue.doBrowseList(Queue.java:1216)
>     at org.apache.activemq.broker.region.Queue.doBrowse(Queue.java:1196)
>     at org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:964)
>     at org.apache.activemq.broker.region.Queue.access$100(Queue.java:108)
>     at org.apache.activemq.broker.region.Queue$2.run(Queue.java:152)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:750)
>  



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