Class SQSConsumer

java.lang.Object
overit.geocall.aws.event.consumer.SQSConsumer
All Implemented Interfaces:
Consumer

@Component @Scope(scopeName="prototype", proxyMode=NO) public class SQSConsumer extends Object implements Consumer
  • Method Details

    • init

      public void init(@NotNull @NotNull ConsumerProperties consumerProperties)
      Description copied from interface: Consumer
      Initialize the consumer with the properties passed
      Specified by:
      init in interface Consumer
      Parameters:
      consumerProperties - properties used to define the consumer
    • destroy

      public void destroy() throws ConsumerException
      Description copied from interface: Consumer
      Delete the consumer
      Specified by:
      destroy in interface Consumer
      Throws:
      ConsumerException - if it's not possible to stop the consumer
    • handleError

      public void handleError(String id, String message, String dlq)
      Description copied from interface: Consumer
      In case of exception during the message consuming, the method will be invoked
      Specified by:
      handleError in interface Consumer
      Parameters:
      id - message id
      message - body of the message
      dlq - dead letter queue to move the message
    • getCurrentNumberThreads

      public int getCurrentNumberThreads()
      Description copied from interface: Consumer
      Get the current number of threads
      Specified by:
      getCurrentNumberThreads in interface Consumer
      Returns:
      current number of threads
    • increaseNThreads

      public void increaseNThreads(int threads)
      Description copied from interface: Consumer
      Increase the number of threads for the current consumer
      Specified by:
      increaseNThreads in interface Consumer
      Parameters:
      threads - number of threads to increase
    • decreaseNThreads

      public void decreaseNThreads(int threads)
      Description copied from interface: Consumer
      Decrease the number of threads for the current consumer
      Specified by:
      decreaseNThreads in interface Consumer
      Parameters:
      threads - number of threads to decrease