Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:02:13+00:00 2026-05-27T06:02:13+00:00

I am using ActiveMQ 5.4 with KahaDB as message store. While Publishing Messages (with

  • 0

I am using ActiveMQ 5.4 with KahaDB as message store.
While Publishing Messages (with Persistence true) to a Topic, which has Durable subscriber, the persistence store is increasing even the messages are dispatched to Subscriber. So this is causing an issue as the message store is getting full and not accepting any more messages.

So my question is why the Persistence store is not discarding the messages in the KahaDB, even the messages are getting dispatched?

Regards,

Srinivas

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:02:14+00:00Added an answer on May 27, 2026 at 6:02 am

    What you are seeing is an interaction between the ActiveMQ message store behaviour and that for durable subscriptions on topics.

    When you have durable subscriptions, a topic is treated like a queue for each subscriber’s clientId (set on the Connection). The logic being that the client doesn’t want to miss any messages when they disconnect. So if they disconnect, the durable subscription hangs around and keeps the messages alive.

    The AMQ message store uses data logs for it’s message journal. These are written sequentially, and never actually removed from (that would require random access). There is a second file which keeps track of which messages have been consumed. Once all the messages in a data file have been consumed, that file is deleted.

    So what you’re seeing is that some of the messages in the data file are not being consumed by these durable subscriptions and just hang around. ClientIds for durable subscribers not being consistently used would cause this issue. It’s likely that there is something wrong with the way the feature is being used, if you use JMX to inspect the subscriptions on the broker that should help you track down the root cause.

    As a general rule, whenever you think that you might want to use a durable subscription, use virtual topics instead – they are much easier to reason about, inspect and load balance. On the other hand if you just want to get the last couple of messages when you reconnect a topic subscriber rather than all the messages you may have missed, use retroactive consumers.

    An easy way to get around this issue is to always use a time to live when you send a message – pretty much every use case has a time limit of when a message ought to be consumed by anyway. ActiveMQ will expire messages beyond this point, and free up the messages in the data files for deletion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a big fan of using message queue systems(like Apache ActiveMQ) for the tasks
I'm investigating using ActiveMQ as an embedded in-process message queue in my application, but
I'm using stomp to write messages to ActiveMQ from Ruby. I'm following example at
I'm using ActiveMQ in a .Net program and I'm flooded with message-events. In short
I'm using ActiveMQ to send and receive messages using a C# app. However I'm
I am using JMS (ActiveMQ) between a Topic Publisher and a variable number of
I have a problem with a durable client on ActiveMQ. I am using stomp.py
I'm setting up a notification service using ActiveMQ, in C#. My ActiveMQ topology is
I'm trying to create simply connect with ActiveMQ using JNDI. I have: Queue named
I'm planning on using Apache NMS for ActiveMQ messaging, and am wondering what serialization

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.