From users-return-50901-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Tue Feb 5 08:09:55 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A7047180608 for ; Tue, 5 Feb 2019 09:09:54 +0100 (CET) Received: (qmail 27308 invoked by uid 500); 5 Feb 2019 08:09:48 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 27297 invoked by uid 99); 5 Feb 2019 08:09:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2019 08:09:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 9BEE1C199E for ; Tue, 5 Feb 2019 08:09:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.512 X-Spam-Level: ** X-Spam-Status: No, score=2.512 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URI_HEX=1.313, URI_TRY_3LD=0.228] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id E7GTkEtBflqC for ; Tue, 5 Feb 2019 08:09:46 +0000 (UTC) Received: from n4.nabble.com (n4.nabble.com [199.38.86.66]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 33ED760E7C for ; Tue, 5 Feb 2019 08:09:46 +0000 (UTC) Received: from n4.nabble.com (localhost [127.0.0.1]) by n4.nabble.com (Postfix) with ESMTP id E9AD151B174F for ; Tue, 5 Feb 2019 02:09:45 -0600 (CST) Date: Tue, 5 Feb 2019 02:09:45 -0600 (CST) From: Yan To: users@activemq.apache.org Message-ID: <1549354185954-0.post@n4.nabble.com> Subject: jdbcPersistenceAdapter and delayed messages MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I recently tried to use ActiveMQ with MySQL as the persistent storage. I can configure those two to work with each other and I can see the 3 tables in the `activemq' database, ACTIVEMQ_ACKS, ACTIVEMQ_LOCK, ACTIVEMQ_MSGS. However, I noticed that the behavior of delayed messages are unexpected. When I set the ScheduledMessage.AMQ_SCHEDULED_DELAY to 60000 (60 seconds), after I send the message, I expect the message to appear somewhere in MySQL database so that it is "persistent". And if I open the admin console (:8161) I should see an enqueued message in the queue. However, the actual behavior is, the message doesn't appear in the ACTIVEMQ_MSGS table in MySQL database *until* 60 seconds later. This seems to tell me that even if I set MySQL database as the persistent storage, delayed messages (when the time does not come yet) are NOT persistent in the MySQL database. I did some research and it seems that even if I configure MySQL as the persistent storage, ACTIVEMQ still use file based KahaDB internally. Can someone tell me if this is the case, and is there a way to use MySQL to store the delayed message? The snippets of my activemq.xml are: Thanks! -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html