-
Notifications
You must be signed in to change notification settings - Fork 920
Open
Description
Hey guys, first of all thanks so much for the repo, amazing examples.
Second, I'm opening this issue to improve the usage of netflix-oss usage in the examples provided. Take for example the CommentsService.java
@HystrixCommand(fallbackMethod = "getFallbackCommentsForTask", commandProperties = {
@HystrixProperty(name = "execution.isolation.strategy", value = "SEMAPHORE"),
@HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "10"),
@HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "1000") })
public CommentCollectionResource getCommentsForTask(String taskId) {
// Get the comments for this task
return restTemplate.getForObject(String.format("http://comments-webservice/comments/%s", taskId),
CommentCollectionResource.class);
}
Since it's just connecting to the comments-webservice could we just use the FeignClient?
@FeignClient(value = "http://comments-webservice", loadbalance = true)
interface CommentsClient{
@RequestMapping(method = RequestMethod.GET, value = "http://comments-webservice/comments/{id}")
CommentCollectionResource getCommentsForTask(@RequestParam("id") String taskId);
}
And in this case should we use Hystrix or not?
Jdruwe and 7nolikov
Metadata
Metadata
Assignees
Labels
No labels