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 6318125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:36:17+00:00 2026-05-24T15:36:17+00:00

I was experimenting with a TopicSubscriber object today (with ActiveMQ as my message broker

  • 0

I was experimenting with a TopicSubscriber object today (with ActiveMQ as my message broker and JMS provider). I found that if I initiated a synchronous receive (with a 2 ms timeout) after establishing a connection, that an exception would be thrown if I stopped ActiveMQ in between establishing the connection to it and initiating the first receive. But if I did the connect, then a successful receive, then stopped the broker, and then did a second receive, that instead of having an exception thrown on that receive, I consistently just got a null message back – no indication that the connection to the broker was lost – even after waiting a couple of hours. And then, after restarting ActiveMQ, unless my program closed and reopened its connection to it, none of its receives would work.

I know I can code around this, but I’m wondering if I’ve missed something as far as knowing how to tell if my connection is lost – please tell me if there’s a way, or if this is just a “feature” of ActiveMQ’s JMS implementation that I need to code around.

  • 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-24T15:36:17+00:00Added an answer on May 24, 2026 at 3:36 pm

    I’ve been using ActiveMQ for a few years, though with queues and not topics, and I’ve never seen behavior like that. I could see, perhaps, if a connection were interrupted without the broker being able to properly disconnect a consumer, that the consumer might not be aware immediately about the problem. I don’t know for sure, but I think that ActiveMQ consumers don’t do much talking to the broker after the connection is established. They just wait for messages to be delivered. Still, I’d expect there to be some kind of heartbeat, and on the OpenWire Format page, it does imply that OpenWire has a default 30-second idle time on it. Try doing some network monitoring to see if the consumer ever tries to send anything. If it does and still doesn’t recognize that the connection is dead, then there’s something fishy going on. Otherwise, it’s probably just a matter of finding the right way to do a keep-alive. The TCPTransport keepalive etting might be good to investigate, too.

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

Sidebar

Related Questions

I experimenting with jQuery. As I was trying I found out that I can't
While experimenting with this question on collections in Spring.NET , I discovered that Spring
When experimenting with (embedded) Apache Derby DB, I noticed that a fresh database, with
I'm experimenting with using couchdb as a message store and would like to report
I'm experimenting with internationalization by making a Hello World program that uses properties files
In experimenting with this question I created an example that I utterly do not
Experimenting with jQuery and trying to make a small slide show that rotates through
Im experimenting with the following code private void timer1_Tick(object sender, EventArgs e) { Thread
experimenting with Visitor pattern and generic method I found a kind of discrepancy in
When experimenting with Cassandra I've observed that Cassandra writes to the following files: /.../cassandra/commitlog/CommitLog-<id>.log

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.