Question

My architecture will use ActiveMQ on the server and have Android clients send and receive messages.The network situation will be very unreliable; possibly hours of missing connection. Is there a framework that will allow me to queue up the messages on the android client and deliver them reliably once the connection is back?

Was it helpful?

Solution

You can efficiently implement one yourself, I don't think anyone will provide you this service, and if they do they will certainly charge, Here is what I can suggest for an optimal solution.

  1. Design a db using SQLITE to hold you message, once a message is ready for deliver from android client, you can perform the following a. If network is avaibale, then you can directly deliver message to your web clinet b. If network in not present, then cache it directly to you local android db

  2. Design a Sync logic, you can achieve it by network listener, so when user device comes back into network, you can write a logic to query from databse and posting to your webclient, deleting local data subsequently upon successful posting into server

  3. You can strengthen you logic, by caching message everytime into local db first, then a Sync logic which will commit your local changes to web server in bulk, thus improving upon processing time.

Hope this answer your problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top