Spring Cloud Communication & Stakeholder Relations 2 — Questions and Answers
Question 1: A stakeholder complains that downstream services are receiving stale data after a configuration update in Spring Cloud Config. What is the most likely cause?
- The Config Server is down
- Client services have not yet refreshed their configuration via /actuator/refresh (Correct answer)
- The Git repository is unreachable
- Spring Boot version mismatch
Correct answer: Client services have not yet refreshed their configuration via /actuator/refresh
Spring Cloud Config clients cache their configuration and require a manual /actuator/refresh call or Spring Cloud Bus broadcast to pick up changes.
Question 2: Which Spring Cloud component would you recommend to a stakeholder who needs asynchronous, broadcast configuration refresh across all microservice instances?
- Spring Cloud Sleuth
- Spring Cloud Bus (Correct answer)
- Spring Cloud Gateway
- Spring Cloud Vault
Correct answer: Spring Cloud Bus
Spring Cloud Bus propagates configuration change events over a message broker (RabbitMQ or Kafka) so all instances refresh simultaneously.
Question 3: A product manager asks why the API Gateway is returning 503 errors for a specific route. Which actuator endpoint helps diagnose Spring Cloud Gateway route configuration?
- /actuator/routes
- /actuator/gateway/routes (Correct answer)
- /actuator/mappings
- /actuator/beans
Correct answer: /actuator/gateway/routes
The /actuator/gateway/routes endpoint exposes the currently loaded route definitions in Spring Cloud Gateway for debugging.
Question 4: When presenting a service mesh strategy to executives, which Spring Cloud feature most directly addresses cross-service security without requiring code changes in each service?
- Spring Cloud Stream
- Spring Cloud Sleuth
- Spring Cloud Security with OAuth2 token relay (Correct answer)
- Spring Cloud Task
Correct answer: Spring Cloud Security with OAuth2 token relay
Spring Cloud Security's OAuth2 token relay automatically propagates security tokens between services without explicit code in each downstream service.
Question 5: A DevOps team asks how to communicate circuit breaker state changes to an ops dashboard. Which Spring Cloud Resilience4j event helps here?
- CircuitBreakerOnCallNotPermittedEvent
- CircuitBreakerOnStateTransitionEvent (Correct answer)
- CircuitBreakerOnSlowCallEvent
- CircuitBreakerOnErrorEvent
Correct answer: CircuitBreakerOnStateTransitionEvent
CircuitBreakerOnStateTransitionEvent fires whenever the circuit transitions between CLOSED, OPEN, and HALF_OPEN states, making it ideal for dashboard alerts.
Question 6: Stakeholders want traceability across microservices for debugging. What does Spring Cloud Sleuth add to log messages to support this requirement?
- User session IDs and HTTP headers
- Trace IDs and span IDs (Correct answer)
- Service version and build numbers
- Database transaction IDs
Correct answer: Trace IDs and span IDs
Spring Cloud Sleuth injects trace IDs (for the overall request) and span IDs (for individual service calls) into logs to enable distributed tracing.
Question 7: A release manager wants to gradually shift traffic from a legacy service to a new Spring Cloud Gateway route. Which built-in predicate or filter supports weighted routing?
- PathRoutePredicateFactory
- WeightRoutePredicateFactory (Correct answer)
- RemoteAddrRoutePredicateFactory
- HeaderRoutePredicateFactory
Correct answer: WeightRoutePredicateFactory
WeightRoutePredicateFactory allows traffic splitting by assigning weights to route groups, enabling canary and blue-green deployments.
A stakeholder complains that downstream services are receiving stale data after a configuration update in Spring Cloud Config.
What is the most likely cause?