4 Replies Latest reply on Nov 18, 2001 9:47 PM by Hiram Chirino

    Logging over JMS - value, alternatives...

    Dmitri Colebatch Newbie

      hey forum,

      I've had put to me that we should be doing our logging (business and technical) by logging to JMS to obtain asynchronous behaviour, and more throughput. The argument also included putting the logging facility on a different box, and using JMS to get to that box asynchronously.

      My feeling is that this isn't a particularly good idea for a number of reasons, but I can understand the motivation. My understanding, is that the motiviation is to:
      (a) not hold up the functionality whilst logging
      (b) distribute the load of the logging onto another box

      Now, afa (a) is concerned, I think its a good idea. However, as sending a JMS message would be part of the same tx, the message would not be send if the tx failed (when you need it the most). I also believe that log4j has an Async appender for this purpose.

      With regard to (b), I'm not really sure how to achieve this efficiently - or indeed if it is worth doing. The JMS option seems nice in this regard, apart from the tx implications. RMI would be too expensive I imagine. The only thing in the back of my mind would be using SocketAppender (combined with Async appender). But I'm not sure if that would really reduce any load on the machine - which is the whole idea of logging on a separate box. Is writing to a socket going to be any cheaper to writing to a file?

      Not sure if this would better fit in another forum, but the JMS bit can definately fit here, so I figured thats where I'd start.

      thanks in advance for any feedback.

      cheers
      dim