activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AMQ-6671) ActiveMQ with PostgreSQL: Not deleting persistent messages sent to a topic
Date Tue, 09 May 2017 14:29:04 GMT

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

Gary Tully edited comment on AMQ-6671 at 5/9/17 2:28 PM:
---------------------------------------------------------

[~anujkhandelwal90] it may be that the cleanup task needs to run a few times. messages for
durable subs that are unreferenced are deleted periodically with the cleanupPeriod which defaults
to 5mins. Then there is an iteration per each priority 1-10, messages with default priority
4 may take 20mins to clear by default

see: https://github.com/apache/activemq/blob/57795bafcea290c6879bb288822435c480a9212d/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java#L829


was (Author: gtully):
[~anujkhandelwal90] it may be that the cleanup task needs to run a few times. messages for
durable subs that are unreferenced are deleted periodically with the cleanupPeriod which defaults
to 5mins. Then there is an iteration per each priority 1-10, messages with default priority
4 may take 20mins to clear by default

>  ActiveMQ with PostgreSQL: Not deleting persistent messages sent to a topic
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-6671
>                 URL: https://issues.apache.org/jira/browse/AMQ-6671
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, JDBC
>    Affects Versions: 5.11.1
>            Reporter: Anuj Khandelwal
>
> Using ActiveMQv5.11.1 
> I ran a test case where a durable subscriber was listening from a topic and a publisher
is publishing persistent messages. I observed that the messages were stored in the DB (ACTIVEMQ_MSGS
table) but even after successful consumption by the consumer, these messages were not deleted
from the backend DB. However I have seen that this doesn't happen in case of queue. Persistent
messages sent to a queue are automatically deleted from the DB once successfully consumed
by the consumer. 
> More details: 
> 1. 1 producer 1 durable subscriber. Subscriber is in auto_ack mode. 
> 2. Producer sent 100 persistent messages to consumer 
> 3. Consumer successfully consumed them. 
> 4. DB still has those messages. 
> 5. Stop producer and consumer both, but messages are still there. 
> 6. Even after restarting broker, message does not get deleted. 
> This is a very generic use case which should never happen. It is also reproducible.
> Thanks, 
> Anuj



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message