• Tutorials
  • Courses
  • Tracks

Advance Java Quiz Day 75

Last Updated :
Discuss
Comments

Question 1

What is the main role of Spring Cloud Gateway in a microservices architecture?

  • Service discovery

  • API routing and filtering

  • Database connection pooling

  • Circuit breaking

Question 2

When integrating Eureka with Spring Cloud Gateway, the gateway can automatically route requests to services using:

  • Service name from Eureka registry

  • IP address only

  • Static configuration files

  • Manual routing rules only

Question 3

Which annotation enables a class to be a Feign Client in Spring Boot?

  • @EnableFeignClients

  • @FeignService

  • @FeignClient

  • @FeignRequest

Question 4

What is the primary purpose of Hystrix in Spring Cloud Netflix?

  • Service registration

  • Load balancing

  • Circuit breaking and fault tolerance

  • Asynchronous messaging

Question 5

Which library is recommended as a modern replacement for Hystrix in Spring Boot?

  • Ribbon

  • Resilience4j

  • Feign

  • Eureka

Question 6

In Resilience4j’s Circuit Breaker pattern, what happens when the breaker is open?

  • Requests are allowed to pass through

  • Requests are blocked and fallback logic is executed

  • Requests are queued until service responds

  • Service automatically restarts

Question 7

In a Feign Client definition, how do you specify the target service name from Eureka?

  • As the value of @FeignClient(name = "service-name")

  • As a property in application.properties only

  • By passing it in the URL dynamically

  • By writing a custom load balancer

Question 8

Which dependency is required to enable OpenFeign in Spring Boot?

  • spring-cloud-starter-feign

  • spring-cloud-starter-openfeign

  • spring-cloud-feign-client

  • spring-boot-starter-feign

Question 9

In a Spring Cloud Gateway route definition, which key is used to specify the destination URI?

  • uri

  • path

  • service

  • endpoint

There are 9 questions to complete.

Take a part in the ongoing discussion