You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declaratively - Using application.yml or application.properties
Configuration Precedence
Programmatic configuration (highest priority)
application.yml / application.properties
Default values (lowest priority)
Global Configuration
application.yml
firefly:
service-client:
enabled: true # Enable/disable the librarydefault-timeout: 30s# Default timeout for all clientsenvironment: DEVELOPMENT # DEVELOPMENT, TESTING, or PRODUCTION# Global default headers (applied to all clients)default-headers:
User-Agent: "MyApp/1.0"X-Client-Version: "1.0.0"
Properties Reference
Property
Type
Default
Description
enabled
boolean
true
Enable/disable auto-configuration
default-timeout
Duration
30s
Default timeout for all clients
environment
String
DEVELOPMENT
Environment: DEVELOPMENT, TESTING, PRODUCTION
default-headers
Map
{}
Headers applied to all clients
REST Configuration
application.yml
firefly:
service-client:
rest:
# Connection Poolmax-connections: 100# Maximum connections in poolmax-idle-time: 5m# Max idle time for connectionsmax-life-time: 30m# Max lifetime for connectionspending-acquire-timeout: 10s# Timeout for acquiring connection# Timeoutsresponse-timeout: 30s# Response timeoutconnect-timeout: 10s# Connection timeoutread-timeout: 30s# Read timeout# Featurescompression-enabled: true # Enable gzip compressionlogging-enabled: false # Enable request/response loggingfollow-redirects: true # Follow HTTP redirects# Limitsmax-in-memory-size: 1048576# 1MB - Max in-memory buffer sizemax-retries: 3# Max retry attempts# Content Typesdefault-content-type: "application/json"default-accept-type: "application/json"
firefly:
service-client:
circuit-breaker:
enabled: true # Enable circuit breaker# Thresholdsfailure-rate-threshold: 50.0# Open after 50% failuresminimum-number-of-calls: 5# Min calls before evaluation# Sliding Windowsliding-window-size: 10# Window size for metrics# State Transitionswait-duration-in-open-state: 60s# Wait before half-openpermitted-number-of-calls-in-half-open-state: 3# Calls in half-openmax-wait-duration-in-half-open-state: 30s# Max time in half-openautomatic-transition-from-open-to-half-open-enabled: true# Timeoutscall-timeout: 10s# Call timeout# Slow Callsslow-call-duration-threshold: 5s# Threshold for slow callslow-call-rate-threshold: 100.0# Slow call rate threshold