Skip to content

Instantly share code, notes, and snippets.

@njofce
Created August 6, 2019 13:00
Show Gist options
  • Save njofce/c5ac641fbe61fcb35e9da9a6f9cfd805 to your computer and use it in GitHub Desktop.
Save njofce/c5ac641fbe61fcb35e9da9a6f9cfd805 to your computer and use it in GitHub Desktop.
@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