# 2026-04-29: Emporix SDK - Multi-tenant support

## Overview

A new `1.2.4` version of the Emporix SDK has been released with multi-tenant support.

The SDK now supports running **multiple Emporix tenants within a single JVM**. This is useful when your application needs to communicate with different Emporix environments (e.g., QA, staging, production) or different tenant accounts simultaneously.

When additional tenants are configured, the SDK automatically creates a full bean stack for each tenant — including `EmporixProperties`, `EmporixClientFactory`, `EmporixTokenService`, and all API clients. These beans are injected using Spring's `@Qualifier` annotation with the tenant key as the qualifier value.

## New features

| Feature                       | Description                                                                                                                                 |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Multi-tenant configuration    | Define additional tenants under `emporix.tenants.<key>` in `application.yml`. Each `<key>` becomes the `@Qualifier` value for injection.    |
| Property inheritance          | Each tenant inherits shared settings (timeouts, cache) from the default configuration. Only differing properties need to be specified.      |
| Custom credentials per tenant | Custom OAuth2 credentials can be defined per tenant, with fallback to the default custom credentials.                                       |
| Startup validation            | The SDK validates multi-tenant configuration at startup and fails fast with descriptive error messages if rules are violated.               |
| Non-intrusive design          | Tenant-specific beans are non-default candidates, so they never interfere with unqualified injection or user-provided `@Primary` overrides. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/changelog/2026/2026-04-29-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
