Feign Client — Concept Check
Questions on Feign Client. Feign is a declarative HTTP client — define an interface annotated with Spring MVC annotations and Feign generates the implementation. Add Resilience4j for circuit breaking and retry to make inter-service calls production-safe.
Questions in this quiz
7 questions on Feign Client — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer is using Feign to call a payment service. They notice that the service occasionally fails due to network issues. Which feature of Feign combined with Resilience4j can help handle these transient errors?
- ACircuit breaker
- BCaching
- CRetry mechanism
- DLoad balancing
2.In a microservices architecture, a service call fails due to a downstream service being unavailable. What can be implemented to prevent cascading failures?
- AService discovery
- BCircuit breaker
- CRetry mechanism
- DLoad balancing
3.A developer added @FeignClient to an interface but forgot to use @EnableFeignClients in the main application class. What will happen?
- AApplication will crash
- BFeign clients will still work
- CFeign clients won't be scanned
- DFeign clients will be scanned twice
4.What annotation is used to specify the HTTP method and endpoint in a Feign client interface?
- A@FeignClient
- B@PostMapping
- C@RequestMapping
- D@Service
5.A developer configures a Feign client with a 2s connect-timeout and a 5s read-timeout. What happens if a request takes 6 seconds to read?
- ARequest fails due to connect timeout
- BRequest retries automatically
- CRequest succeeds
- DRequest fails due to read timeout
6.A developer notices that their Feign client is not using the fallback implementation during a service outage. What might be missing?
- ACorrect URL in @FeignClient
- BRetry configuration
- CFallbackFactory implementation
- D@Service annotation
7.What is the purpose of the sliding-window-size configuration in Resilience4j circuit breaker?
- ATo specify the connection timeout
- BTo set the maximum retry attempts
- CTo define the wait duration in open state
- DTo evaluate the last N calls for failure rate