Skip to main content
The Confidence Java SDK provides ultra-low latency feature flag evaluation for Java applications using the Confidence Resolver—a Rust-based resolver that runs natively.

Features

  • Local evaluation: Flag rules evaluate on your infrastructure in microseconds
  • OpenFeature compatible: Standard feature flag API through OpenFeature provider
  • Background sync: Flag rules and logging sync with Confidence in the background
  • High reliability: No network dependency at evaluation time

Installation

Quickstart

HTTP Proxy Service

The FlagResolverService lets you proxy flag resolution requests from client SDKs through your Java backend. Instead of client SDKs connecting directly to Confidence servers, they connect to your service, which resolves flags locally. The proxy service enables:
  • Backend-controlled credentials: Client SDKs don’t need their own client secrets
  • Context enrichment: Add server-side context (user ID from auth, request metadata) before resolution
  • Low-latency resolution: Client SDKs make requests to your backend instead of Confidence servers, which can sometimes improve latency

Setup

Context Decoration

Add server-side context to requests before resolution:

Framework Integration

The service exposes handleResolve and handleApply methods that accept a ConfidenceHttpRequest and return a ConfidenceHttpResponse. Adapt these to any HTTP framework:

Client SDK configuration

Configure client SDKs to resolve flags through your backend:
Only application/json content type is supported. Requests with other content types receive a 415 response.

Resources

GitHub repository

Source code and examples

OpenFeature Java SDK

OpenFeature documentation

Context

Configure evaluation context

Apply events

Understand flag assignment tracking