0

I'm implementing a client feign with a hystrix fallback; My problem is that the fallback class calls an API that uses some different data from the clientFeign. So, my question is: is there a way to pass some additional parameters to my feign, so it can be used just by the fallback class?

@FeignClient(name = "${feign.inventory.name}", url = "${feign.inventory.url:}", fallbackFactory = StockFallback.class)
public interface StockClient {

@RequestMapping(method = GET, value = "/{sku}/{groupId}", consumes = APPLICATION_JSON_VALUE,
  produces = APPLICATION_JSON_VALUE)
List<ItemStock> getStockSkuAndInventoryGroup(@PathVariable("sku") final String sku,
  @PathVariable("groupId") final String groupId);
}
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

As spencergibb pointted there is no possibilities of passing an adittional parameter to use in a histrix feign fall back. So we developed anew end-point which uses the same data as the original, so that the fallback take on clearly and transparent.