Class SQSConsumer
java.lang.Object
overit.geocall.aws.event.consumer.SQSConsumer
- All Implemented Interfaces:
Consumer
-
Method Summary
Modifier and TypeMethodDescriptionvoiddecreaseNThreads(int threads) Decrease the number of threads for the current consumervoiddestroy()Delete the consumerintGet the current number of threadsvoidhandleError(String id, String message, String dlq) In case of exception during the message consuming, the method will be invokedvoidincreaseNThreads(int threads) Increase the number of threads for the current consumervoidinit(@NotNull ConsumerProperties consumerProperties) Initialize the consumer with the properties passedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.event.consumer.Consumer
checkTopicSegregation
-
Method Details
-
init
Description copied from interface:ConsumerInitialize the consumer with the properties passed -
destroy
Description copied from interface:ConsumerDelete the consumer- Specified by:
destroyin interfaceConsumer- Throws:
ConsumerException- if it's not possible to stop the consumer
-
handleError
Description copied from interface:ConsumerIn case of exception during the message consuming, the method will be invoked- Specified by:
handleErrorin interfaceConsumer- Parameters:
id- message idmessage- body of the messagedlq- dead letter queue to move the message
-
getCurrentNumberThreads
public int getCurrentNumberThreads()Description copied from interface:ConsumerGet the current number of threads- Specified by:
getCurrentNumberThreadsin interfaceConsumer- Returns:
- current number of threads
-
increaseNThreads
public void increaseNThreads(int threads) Description copied from interface:ConsumerIncrease the number of threads for the current consumer- Specified by:
increaseNThreadsin interfaceConsumer- Parameters:
threads- number of threads to increase
-
decreaseNThreads
public void decreaseNThreads(int threads) Description copied from interface:ConsumerDecrease the number of threads for the current consumer- Specified by:
decreaseNThreadsin interfaceConsumer- Parameters:
threads- number of threads to decrease
-