title: Sending app logs with MQTT VS REST
body: <p>I got an android application that I would like to send its use log to my server so it would be saved in a database.</p>
  
  <p>Basically I would like to log almost every action the user does, even a simple button click.</p>
  
  <p>Since MQTT is already used in the application I thought maybe it would be good to use it for logging as well.</p>
  
  <p>For example: every time I would like to log something, I would just publish the action through MQTT, then some server-
  side service would subscribe to that logging channel, and each time a log publication would arrive, it would insert it to the DB.</p>
  
  <p>However there are several things I'm worried about - </p>
  
  <ol>
  <li>I'd like to know if publishing a message of 30 characters each time the user does anything would be heavy on bandwidth.</li>
  <li>What would be the best solution for a service that would listen to that channel and insert each message into a DB.</li>
  </ol>
  
  <p>Another option is to send the data through a regular REST method, though then I got 2 options, either send it in big bulks (I would have to know when is the right time to send it before the application closes) or send it in real-time when the logging action occurs.</p>
  
  <p>Then I wouldn't need a service that would subscribe to the MQTT logging channel.</p>
  
  <p>And let's assume that my server should be able to handle several thousands of users concurrently.</p>
  
  <p>Any interesting thoughts? </p>
  
  <p>Thanks!</p>