what is best practices to implement Multithread + JMS ?

Let us assume we are listening financial market data feed. I have this coding like this:

class MyClass implements Listener{ private final ExecutorService pool = Executors.newFixedThreadPool(poolSize);
  onMessage(...){
pool.execute(new Handler(Message)); }
 class Handler implements Runnable {
    public run(){
      // get data, same it into db
    }
  }
}

Anybody can share your experiences in this topic ?

Thanks.



Reply via email to