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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:44:27+00:00 2026-06-02T21:44:27+00:00

I have a server which maintains a global state of an application. Clients can

  • 0

I have a server which maintains a global state of an application.

Clients can connect to the server and get messages about changes in the global state (publish/subscribe mechanism in order for the server to broadcast the information).

However, at start-up, the clients have no information at all about the global state, and they need it. What I want is for any new client subscribing to the system, the first notification message is the full state of the application. Then they only receive changes about this state:

  1. a client connects to the messaging system
  2. it subscribes to the messaging system
  3. the first message it gets is the full state of the system
  4. then, it only receives changes about the global state

The idea is similar to a multiplayer game where a new player must first get the full state of the game and then only changes in the game are sent.

Messaging systems like ActiveMQ or Stomp are fine for my needs, as they are multi-languages and can be used with several transport layers. However there is not this notion of sending the full state (or cumulate the last changes in a coherent way).

Of course, I could easily provide this state in a static way (first I get the full state, and then I subscribe to the publish/subscribe sytem), however I must be careful about possible changes in the meantime (did I lose some changes while processing the full state? Is this change already taken into account in the global state I just retrieved? …). However I lose the multi-language/multi-transport aspect already provided by Stomp and ActiveMQ.

Are there some existing libraries/tools to do that? Some kind of extensions for ActiveMQ? Something similar to Stomp? Or does it need to be hand made?

  • 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-06-02T21:44:28+00:00Added an answer on June 2, 2026 at 9:44 pm

    This is not a messaging domain problem, but a specific use case. Pub/Sub is not designed to know any state information about the producer/consumer, it just proxies messages.

    That said, there are a few different redelivery patterns that can be used to bridge the gap a bit (Last Image Subscription Policy, etc), but I’d opt for simpler solutions. Also, you might consider using something like Apache Camel to sit in between producers and subscribers to provide this extra logic..

    As you said, the tricky part is to keeping incremental updates in sync with the full system image retrieved. Off the top, here is what I’d do…

    • provide a REST service to allow any clients to pull the full state of the system
    • add an incrementing version number to both the full state data and incremental update data
    • when a client comes online
      • subscribe to start getting incremental updates (queue them internally for now)
      • use the REST service to get the full system state
      • then, start processing incremental updates and disregard old ones based on the version numbers
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our application we have a server which will connect to multiple clients. For
I have a server application which I want to protect from being stopped by
I have a java server which is using TCP and sockets to connect to
I have a server which already host ASP.Net website. I am migrating from blogger
I have a server which executes Python scripts from a certain directory path. Incidently
Hi I have a server which has several virtual hosts set up on it.
i have a c++ server which is using boost::asio to do read/write operations -
I have a web server which I do not know what the time zone
I have a web server which is protected behind http-basic-auth. I've read through the
I have a server class which connects a client on a specific server socket

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.