-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Signup service - Changes required in Async notification calls Signed-off-by: mengleang-ngoun <[email protected]> * throw exception and add test case Signed-off-by: mengleang-ngoun <[email protected]> --------- Signed-off-by: mengleang-ngoun <[email protected]>
- Loading branch information
1 parent
c168148
commit 99fbf1b
Showing
6 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
signup-service/src/main/java/io/mosip/signup/config/Config.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.mosip.signup.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | ||
|
||
import java.util.concurrent.Executor; | ||
|
||
@Configuration | ||
public class Config { | ||
|
||
@Value("${mosip.signup.task.core.pool.size:20}") | ||
private int taskCorePoolSize; | ||
|
||
@Value("${mosip.signup.task.max.pool.size:20}") | ||
private int taskMaxPoolSize; | ||
|
||
@Bean | ||
public Executor taskExecutor() { | ||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); | ||
executor.setCorePoolSize(taskCorePoolSize); | ||
executor.setMaxPoolSize(taskMaxPoolSize); | ||
executor.setThreadNamePrefix("MOSIP-SIGNUP-Async-Thread-"); | ||
executor.initialize(); | ||
return executor; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters