Class QueueProcessor

java.lang.Object
com.codeheadsystems.queue.impl.QueueProcessor
All Implemented Interfaces:
io.dropwizard.lifecycle.Managed

@Singleton public class QueueProcessor extends Object implements io.dropwizard.lifecycle.Managed
The Queue Processor. Reads the queues and creates workers for the messages.
  • Constructor Details

    • QueueProcessor

      @Inject public QueueProcessor(MessageManager messageManager, QueueConfigurationFactory queueConfigurationFactory, MessageConsumerExecutor messageConsumerExecutor, com.codeheadsystems.metrics.Metrics metrics)
      Instantiates a new Queue processor.
      Parameters:
      messageManager - the messageManager
      queueConfigurationFactory - the queue configuration factory
      messageConsumerExecutor - the message consumer executor
      metrics - the metrics
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface io.dropwizard.lifecycle.Managed
    • processPendingQueue

      public void processPendingQueue()
      Process pending queue.
    • stop

      public void stop() throws Exception
      Specified by:
      stop in interface io.dropwizard.lifecycle.Managed
      Throws:
      Exception