Created
August 6, 2019 13:00
-
-
Save njofce/c5ac641fbe61fcb35e9da9a6f9cfd805 to your computer and use it in GitHub Desktop.
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
@Autowired | |
private InstitutionManagementClient institutionManagementClient; // This is the Feign client | |
@HystrixCommand(fallbackMethod = “getAssociatedInstitutionFallback”, | |
threadPoolKey = “threadPoolInstitution”, | |
threadPoolProperties = { | |
@HystrixProperty(name = “coreSize”, value = “15”), | |
@HystrixProperty(name = “maxQueueSize”, value = “5”) | |
} | |
) | |
public Institution getAssociatedInstitution(String agentId) { | |
institutionManagementClient.getInstitutionForAgent(agentId); | |
} | |
public Institution getAssociatedInstitutionFallback(String agentId) { | |
return Institution.title(“Null institution”).agent(agentId).build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment