Class ResilientDashboardGateway

java.lang.Object
com.dani.bff.gateway.ResilientDashboardGateway

@Component public class ResilientDashboardGateway extends Object
Applies circuit-breaker policies and fallback behavior around dashboard downstream calls.
  • Constructor Details

  • Method Details

    • getUserProfile

      @CircuitBreaker(name="userService", fallbackMethod="fallbackUserProfile") public reactor.core.publisher.Mono<UserProfile> getUserProfile(String userId)
      Reads the user's profile with a safe placeholder fallback.
      Parameters:
      userId - authenticated user identifier
      Returns:
      profile from the user service or a placeholder when unavailable
    • getRecommendedProducts

      @CircuitBreaker(name="productService", fallbackMethod="fallbackRecommendedProducts") public reactor.core.publisher.Mono<List<ProductRecommendation>> getRecommendedProducts(String userId)
      Reads recommendations with an empty-list fallback.
      Parameters:
      userId - authenticated user identifier
      Returns:
      recommendations from the product service or an empty list when unavailable