Re-factoring main class to support ActiveMQ or Tibco