> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update environment variables

> Update environment variables for all existing FlowX.AI services

Update environment variable configurations for all existing FlowX.AI services to support version 5.1.0 compatibility.

## Audit core

<Note>
  Elasticsearch configuration migrates from `SPRING_ELASTICSEARCH_*` to `FLOWX_ELASTICSEARCH_*` namespace with enhanced index management.
</Note>

### Variables to remove & replace

| Remove This Variable                            | Replace With                                 | Old Default  | New Default  |
| ----------------------------------------------- | -------------------------------------------- | ------------ | ------------ |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_DATASTREAM` | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_NAME`     | `audit-logs` | `audit-logs` |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_SHARDS`     | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_SHARDS`   | `2`          | `2`          |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_REPLICAS`   | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_REPLICAS` | `2`          | `0`          |

### New variables to add

| Variable                                | Default Value | Description                     |
| --------------------------------------- | ------------- | ------------------------------- |
| `FLOWX_ELASTICSEARCH_INDEXROLLOVERDAYS` | `30`          | Automatic index rollover policy |

## Data Search

<Note>
  Simple migration with containerization support and namespace alignment.
</Note>

### Variables to update

| Variable                         | Current Value    | New Value            | Reason                   |
| -------------------------------- | ---------------- | -------------------- | ------------------------ |
| `SPRING_ELASTICSEARCH_REST_URIS` | `localhost:9200` | `elasticsearch:9200` | Containerization support |

### Variables to replace

| Remove This                               | Add This                                 | Default Value      |
| ----------------------------------------- | ---------------------------------------- | ------------------ |
| `SPRING_ELASTICSEARCH_INDEXSETTINGS_NAME` | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_NAME` | `process_instance` |

## Document plugin

<Note>
  New configuration option for test documents bucket customization.
</Note>

### New variables to add

| Variable                                     | Default Value     | Description                                                                                                    |
| -------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------- |
| `APPLICATION_FILE_STORAGE_TEST_FILES_BUCKET` | `-test-documents` | Overrides the default test documents bucket suffix. Use this to configure a custom bucket name for test files. |

<Info>
  This variable allows you to override the default `-test-documents` bucket suffix. You can configure a custom bucket name or use the same bucket as the main storage if needed.
</Info>

## Kafka configuration

<Info>
  Complete Kafka migration including consumer group standardization to kebab-case, comprehensive topic restructuring with new versioned naming patterns, and enhanced messaging features across all FlowX.AI services.
</Info>

<Warning>
  **Do not modify default consumer group names.** We strongly recommend against changing the default consumer group names as this operation can lead to misconfigurations. The application is designed to work and scale with the consumer groups as they are defined by default.
</Warning>

### Consumer group migrations

<Accordion title="View all 33 consumer group name changes across all FlowX.AI services">
  **Admin (3 groups):**

  | Old Group ID                       | New Group ID                           |
  | ---------------------------------- | -------------------------------------- |
  | `genericProcessingGroup`           | `generic-processing-group`             |
  | `processSyncGroup`                 | `process-sync-group`                   |
  | `adminResourcesUsagesRefreshGroup` | `admin-resources-usages-refresh-group` |

  **Application Manager (15 groups):**

  | Old Group ID                        | New Group ID                              |
  | ----------------------------------- | ----------------------------------------- |
  | `appResourceExportGroup`            | `app-resource-export-group`               |
  | `appResourceImportGroup`            | `app-resource-import-group`               |
  | `appResourceUsagesGroup`            | `app-resource-usages-group`               |
  | `appResElemUsageValidationResp`     | `app-resource-elem-usage-validation-resp` |
  | `appResourceCopyGroup`              | `app-resource-copy-group`                 |
  | `appResourceSyncGroup`              | `app-resource-sync-group`                 |
  | `appResourceUpdatePropagationGroup` | `app-resource-update-propagation-group`   |
  | `appMergeItemGroup`                 | `app-merge-item-group`                    |
  | `buildCreateGroup`                  | `build-create-group`                      |
  | `buildUpdateGroup`                  | `build-update-group`                      |
  | `buildResourceExportGroup`          | `build-resource-export-group`             |
  | `buildResourceImportGroup`          | `build-resource-import-group`             |
  | `buildRuntimeDataGroup`             | `build-runtime-data-group`                |
  | `buildStartTimerEventsUpdatesGroup` | `build-start-timer-events-updates-group`  |
  | `processStartGroup`                 | `process-start-group`                     |

  **CMS Core (1 group):**

  | Old Group ID           | New Group ID         |
  | ---------------------- | -------------------- |
  | `cms-consumer-preview` | `cms-consumer-group` |

  **Document Plugin (1 group):**

  | Old Group ID                              | New Group ID                  |
  | ----------------------------------------- | ----------------------------- |
  | `kafka-svc-document-consumer-local-test2` | `kafka-svc-document-consumer` |

  **Integration Designer (3 groups):**

  | Old Group ID                                | New Group ID                                           |
  | ------------------------------------------- | ------------------------------------------------------ |
  | `integrDesignerResourcesUsagesRefreshGroup` | `integration-designer-resources-usages-refresh-group`  |
  | `genericProcessingGroup`                    | `start-workflows-group`                                |
  | `resElemUsageValidation`                    | `integration-designer-res-elem-usage-validation-group` |

  **Notification Plugin (1 group):**

  | Old Group ID       | New Group ID                   |
  | ------------------ | ------------------------------ |
  | `notif123-preview` | `notification-plugin-consumer` |

  **Process Engine (11 groups):**

  | Old Group ID (all were `notif123-preview`) | New Group ID               |
  | ------------------------------------------ | -------------------------- |
  | `notif123-preview`                         | `advance`                  |
  | `notif123-preview`                         | `notify-parent`            |
  | `notif123-preview`                         | `adapters`                 |
  | `notif123-preview`                         | `scheduler-run-action`     |
  | `notif123-preview`                         | `scheduler-advancing`      |
  | `notif123-preview`                         | `message-events`           |
  | `notif123-preview`                         | `process-start`            |
  | `notif123-preview`                         | `process-start-for-event`  |
  | `notif123-preview`                         | `process-expire`           |
  | `notif123-preview`                         | `process-operations`       |
  | `notif123-preview`                         | `process-batch-processing` |
</Accordion>

### Kafka topic migrations

<Note>
  All Kafka topics migrate to versioned naming pattern `ai.flowx.{env}.{service}.{operation}.v1` for improved organization and future compatibility.
</Note>

<Tabs>
  <Tab title="Application Manager">
    **Application resource topics:**

    | Environment Variable                                                                | New Topic Name                                                                             |
    | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_CORRECTIONAFTERAPPOPERATION_IN`                   | `ai.flowx.application-version.correction-after-app-operation.response.v1`                  |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_CORRECTIONAFTERAPPOPERATION_OUT_PROCESS`          | `ai.flowx.application-version.correction-after-app-operation.process.request.v1`           |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_CORRECTIONAFTERAPPOPERATION_OUT_BUSINESSRULE`     | `ai.flowx.application-version.correction-after-app-operation.business-rule.request.v1`     |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_CORRECTIONAFTERAPPOPERATION_OUT_REUSABLETEMPLATE` | `ai.flowx.application-version.correction-after-app-operation.reusable-template.request.v1` |

    **Sync topics:**

    | Environment Variable                                            | New Topic Name                                              |
    | --------------------------------------------------------------- | ----------------------------------------------------------- |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_PROCESS_IN`          | `ai.flowx.application-version.sync.process.in.v1`           |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_BUSINESSRULE_IN`     | `ai.flowx.application-version.sync.business-rule.in.v1`     |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_REUSABLETEMPLATE_IN` | `ai.flowx.application-version.sync.reusable-template.in.v1` |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_IN`                      | `ai.flowx.application-version.sync.out.v1`                  |

    **Resource update propagation:**

    | Environment Variable                                 | New Topic Name                                                |
    | ---------------------------------------------------- | ------------------------------------------------------------- |
    | `KAFKA_TOPIC_APPLICATION_RESOURCE_UPDATEPROPAGATION` | `ai.flowx.application-version.resource.update.propagation.v1` |

    **Build resource topics:**

    | Environment Variable            | New Topic Name                   |
    | ------------------------------- | -------------------------------- |
    | `KAFKA_TOPIC_BUILD_RUNTIMEDATA` | `ai.flowx.build.runtime-data.v1` |
  </Tab>

  <Tab title="Admin">
    **Consumer groups:**

    | Environment Variable                                         | New Consumer Group                        | Threads |
    | ------------------------------------------------------------ | ----------------------------------------- | ------- |
    | `KAFKA_CONSUMER_GROUPID_PROCESS_SYNC`                        | `process-sync-group`                      | `6`     |
    | `KAFKA_CONSUMER_GROUPID_BUSINESS_RULE_SYNC`                  | `business-rule-sync-group`                | `6`     |
    | `KAFKA_CONSUMER_GROUPID_REUSABLE_TEMPLATE_SYNC`              | `reusable-template-sync-group`            | `6`     |
    | `KAFKA_CONSUMER_GROUPID_PROCESS_CORRECTIONAFTERAPPOPERATION` | `processCorrectionAfterAppOperationGroup` | `6`     |

    **Application sync topics:**

    | Environment Variable                            | New Topic Name                                              |
    | ----------------------------------------------- | ----------------------------------------------------------- |
    | `KAFKA_TOPIC_APPLICATION_SYNC_RESPONSE`         | `ai.flowx.application-version.sync.out.v1`                  |
    | `KAFKA_TOPIC_APPLICATION_PROCESS_SYNC`          | `ai.flowx.application-version.sync.process.in.v1`           |
    | `KAFKA_TOPIC_APPLICATION_BUSINESSRULE_SYNC`     | `ai.flowx.application-version.sync.business-rule.in.v1`     |
    | `KAFKA_TOPIC_APPLICATION_REUSABLETEMPLATE_SYNC` | `ai.flowx.application-version.sync.reusable-template.in.v1` |

    **Application correction after app operation topics:**

    | Environment Variable                                                      | New Topic Name                                                                             |
    | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
    | `KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_IN_PROCESS`          | `ai.flowx.application-version.correction-after-app-operation.process.request.v1`           |
    | `KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_IN_BUSINESSRULE`     | `ai.flowx.application-version.correction-after-app-operation.business-rule.request.v1`     |
    | `KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_IN_REUSABLETEMPLATE` | `ai.flowx.application-version.correction-after-app-operation.reusable-template.request.v1` |
    | `KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_OUT`                 | `ai.flowx.application-version.correction-after-app-operation.response.v1`                  |

    **Build topics:**

    | Environment Variable            | New Topic Name                   |
    | ------------------------------- | -------------------------------- |
    | `KAFKA_TOPIC_BUILD_RUNTIMEDATA` | `ai.flowx.build.runtime-data.v1` |
  </Tab>
</Tabs>

### New Kafka features

<CardGroup cols={2}>
  <Card title="Resource Update Propagation" icon="arrow-right-arrow-left">
    **Consumer Group:** `app-resource-update-propagation-group`\
    **Threads:** 3\
    **Topic:** `ai.flowx.{env}.application-version.resource.update.propagation.v1`\
    **Purpose:** Real-time resource change propagation
  </Card>

  <Card title="Build Runtime Data" icon="database">
    **Consumer Group:** `build-runtime-data-group`\
    **Threads:** 2\
    **Topic:** `ai.flowx.{env}.build.runtime-data.v1`\
    **Purpose:** Build process data management
  </Card>

  <Card title="Business Rule Sync" icon="code-branch">
    **Topic:** `ai.flowx.{env}.application-version.sync.business-rule.in.v1`\
    **Purpose:** Enhanced business rule synchronization\
    **Consumer Group:** `business-rule-sync-group`
  </Card>

  <Card title="Process Sync Enhanced" icon="workflow">
    **Topic:** `ai.flowx.{env}.application-version.sync.process.in.v1`\
    **Purpose:** Improved process synchronization\
    **Consumer Group:** `process-sync-group`
  </Card>

  <Card title="Reusable Template Sync" icon="puzzle-piece">
    **Topic:** `ai.flowx.{env}.application-version.sync.reusable-template.in.v1`\
    **Purpose:** Template synchronization\
    **Consumer Group:** `reusable-template-sync-group`
  </Card>

  <Card title="Correction After App Operation" icon="refresh">
    **Multiple Topics:** Process, business rule, and template correction\
    **Purpose:** Post-deployment resource correction\
    **Consumer Group:** `processCorrectionAfterAppOperationGroup`
  </Card>
</CardGroup>

### Configure environment variables

<Info>
  **Automatic Configuration**: Most deployments can rely on the built-in naming patterns without explicit environment variable overrides. Only override when custom naming is required.
</Info>

<CodeGroup>
  ```bash Application Manager Topics theme={"system"}
  # Resource Update Propagation
  KAFKA_TOPIC_APPLICATION_RESOURCE_UPDATEPROPAGATION=ai.flowx.dev.application-version.resource.update.propagation.v1

  # Build Runtime Data  
  KAFKA_TOPIC_BUILD_RUNTIMEDATA=ai.flowx.dev.build.runtime-data.v1

  # Sync Topics
  KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_PROCESS=ai.flowx.dev.application-version.sync.process.in.v1
  KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_BUSINESSRULE=ai.flowx.dev.application-version.sync.business-rule.in.v1
  KAFKA_TOPIC_APPLICATION_RESOURCE_SYNC_OUT_REUSABLE_TEMPLATE=ai.flowx.dev.application-version.sync.reusable-template.in.v1

  # Correction After App Operation
  KAFKA_TOPIC_APPLICATION_RESOURCE_CORRECTIONAFTERAPPOPERATION_OUT_PROCESS=ai.flowx.dev.application-version.correction-after-app-operation.process.request.v1
  KAFKA_TOPIC_APPLICATION_RESOURCE_CORRECTIONAFTERAPPOPERATION_OUT_BUSINESSRULE=ai.flowx.dev.application-version.correction-after-app-operation.business-rule.request.v1
  KAFKA_TOPIC_APPLICATION_RESOURCE_CORRECTIONAFTERAPPOPERATION_OUT_REUSABLETEMPLATE=ai.flowx.dev.application-version.correction-after-app-operation.reusable-template.request.v1
  ```

  ```bash Admin Topics theme={"system"}
  # Application Sync
  KAFKA_TOPIC_APPLICATION_SYNC_RESPONSE=ai.flowx.dev.application-version.sync.out.v1
  KAFKA_TOPIC_APPLICATION_PROCESS_SYNC=ai.flowx.dev.application-version.sync.process.in.v1
  KAFKA_TOPIC_APPLICATION_BUSINESSRULE_SYNC=ai.flowx.dev.application-version.sync.business-rule.in.v1
  KAFKA_TOPIC_APPLICATION_REUSABLETEMPLATE_SYNC=ai.flowx.dev.application-version.sync.reusable-template.in.v1

  # Correction After App Operation
  KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_IN_PROCESS=ai.flowx.dev.application-version.correction-after-app-operation.process.request.v1
  KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_IN_BUSINESSRULE=ai.flowx.dev.application-version.correction-after-app-operation.business-rule.request.v1
  KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_IN_REUSABLETEMPLATE=ai.flowx.dev.application-version.correction-after-app-operation.reusable-template.request.v1
  KAFKA_TOPIC_APPLICATION_CORRECTIONAFTERAPPOPERATION_OUT=ai.flowx.dev.application-version.correction-after-app-operation.response.v1
  ```

  ```bash Consumer Groups and Threads theme={"system"}
  # Application Manager Consumer Groups
  KAFKA_CONSUMER_GROUPID_APPLICATION_RESOURCE_UPDATEPROPAGATION=app-resource-update-propagation-group
  KAFKA_CONSUMER_GROUPID_BUILD_RUNTIMEDATA=build-runtime-data-group

  # Admin Consumer Groups  
  KAFKA_CONSUMER_GROUPID_PROCESS_SYNC=process-sync-group
  KAFKA_CONSUMER_GROUPID_BUSINESS_RULE_SYNC=business-rule-sync-group
  KAFKA_CONSUMER_GROUPID_REUSABLE_TEMPLATE_SYNC=reusable-template-sync-group
  KAFKA_CONSUMER_GROUPID_PROCESS_CORRECTIONAFTERAPPOPERATION=processCorrectionAfterAppOperationGroup

  # Thread Configuration
  KAFKA_CONSUMER_THREADS_APPLICATION_RESOURCE_UPDATEPROPAGATION=3
  KAFKA_CONSUMER_THREADS_BUILD_RUNTIMEDATA=2
  KAFKA_CONSUMER_THREADS_PROCESS_SYNC=6
  KAFKA_CONSUMER_THREADS_BUSINESS_RULE_SYNC=6
  KAFKA_CONSUMER_THREADS_REUSABLE_TEMPLATE_SYNC=6
  KAFKA_CONSUMER_THREADS_PROCESS_CORRECTIONAFTERAPPOPERATION=6
  ```
</CodeGroup>

### Additional Application Manager variables

| Variable                                                         | Default Value | Description                      |
| ---------------------------------------------------------------- | ------------- | -------------------------------- |
| `FLOWX_RESOURCESUSAGES_REFRESHPRODUCER_REFRESHEXPIRATIONSECONDS` | `300`         | Refresh expiration timeout       |
| `SERVER_MAXHTTPREQUESTHEADERSIZE`                                | `16KB`        | Maximum HTTP request header size |

## Integration Designer

### Storage configuration

Added support for S3 storage for files in Integration Designer.

| Variable                                       | Default Value       | Description           |
| ---------------------------------------------- | ------------------- | --------------------- |
| `APPLICATION_FILESTORAGE_TYPE`                 | `s3`                | Storage type          |
| `APPLICATION_FILESTORAGE_PARTITIONSTRATEGY`    | `NONE`              | Partition strategy    |
| `APPLICATION_FILESTORAGE_DELETIONSTRATEGY`     | `delete`            | Deletion strategy     |
| `APPLICATION_FILESTORAGE_S3_ENABLED`           | `true`              | S3 enabled            |
| `APPLICATION_FILESTORAGE_S3_SERVERURL`         | `http://minio:9000` | S3 server URL         |
| `APPLICATION_FILESTORAGE_S3_ENCRYPTIONENABLED` | `false`             | S3 encryption enabled |
| `APPLICATION_FILESTORAGE_S3_ACCESSKEY`         | `minio`             | S3 access key         |
| `APPLICATION_FILESTORAGE_S3_SECRETKEY`         | `minio123`          | S3 secret key         |
| `APPLICATION_FILESTORAGE_S3_BUCKETPREFIX`      | `workflows-bucket`  | S3 bucket prefix      |

### Redis

Added caching when running a workflow.

| Variable                        | Default Value                            | Description        |
| ------------------------------- | ---------------------------------------- | ------------------ |
| `SPRING_CACHE_TYPE`             | `redis`                                  | Cache type         |
| `SPRING_CACHE_REDIS_KEYPREFIX`  | `flowx:core:cache:integration-designer:` | Cache key prefix   |
| `SPRING_CACHE_REDIS_TIMETOLIVE` | `5000000`                                | Cache time to live |
| `SPRING_REDIS_HOST`             | `redis-master`                           | Redis host         |
| `SPRING_REDIS_PORT`             | `6379`                                   | Redis port         |
| `SPRING_REDIS_PASSWORD`         | `defaultpassword`                        | Redis password     |
| `SPRING_REDIS_TTL`              | `5000000`                                | Redis time to live |
| `SPRING_DATA_REDIS_HOST`        | `spring.redis.host`                      | Redis host         |

## FlowX Engine

<Note>
  The ADVANCING controller has been redesigned with separate picking and processing operations for improved performance and resource management.
</Note>

### Variables to remove & replace

| Remove This Variable         | Replace With                                     |
| ---------------------------- | ------------------------------------------------ |
| `ADVANCING_THREADS`          | `ADVANCING_PICKINGTHREADS` (default: `1`)        |
| `ADVANCING_PICKINGBATCHSIZE` | `ADVANCING_PROCESSINGBUFFERSIZE` (default: `20`) |

### New variables to add

| Variable                                    | Default Value | Description                                                    |
| ------------------------------------------- | ------------- | -------------------------------------------------------------- |
| `ADVANCING_PROCESSINGTHREADS`               | `20`          | Number of threads for parallel processing of advancing events  |
| `ADVANCING_BLOCKPICKINGIFNOWORKERAVAILABLE` | `true`        | Block picking operations when no worker threads are available  |
| `ADVANCING_DATASOURCE_MAXIMUMPOOLSIZE`      | `20`          | Maximum database connection pool size for advancing operations |

### Variables to update

| Variable                       | Current Value | New Value | Reason                                          |
| ------------------------------ | ------------- | --------- | ----------------------------------------------- |
| `ADVANCING_PICKINGPAUSEMILLIS` | `100`         | `50`      | Optimized pause duration for better performance |

<Info>
  **How the new advancing controller works:**

  * **Picking threads** (`ADVANCING_PICKINGTHREADS`): Controls how many worker threads read events from the database. This handles only the picking/reading operations.

  * **Processing buffer** (`ADVANCING_PROCESSINGBUFFERSIZE`): Acts as a queue between picking and processing. When the buffer is full, no new events are read. When there's available space, that amount of events will be read.

  * **Processing threads** (`ADVANCING_PROCESSINGTHREADS`): Controls how many threads process the advancing events in parallel. Events are processed instantly if processing threads are available. If all processing threads are busy, events accumulate in the buffer until it reaches capacity.

  * **Blocking behavior** (`ADVANCING_BLOCKPICKINGIFNOWORKERAVAILABLE`): When enabled, prevents picking operations if no worker threads are available, ensuring better resource management.
</Info>

### Elasticsearch indexing configuration

<Note>
  Elasticsearch indexing environment variables have been updated with new naming conventions for better consistency with FlowX naming standards.
</Note>

#### Variables to remove & replace

| Remove This Variable                           | Replace With                                 | Old Default        | New Default        |
| ---------------------------------------------- | -------------------------------------------- | ------------------ | ------------------ |
| `FLOWX_INDEXING_PROCESSINSTANCE_INDEXING_TYPE` | `FLOWX_INDEXING_TYPE`                        | `kafka`            | `kafka`            |
| `FLOWX_INDEXING_PROCESSINSTANCE_INDEX_NAME`    | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_NAME`     | `process_instance` | `process_instance` |
| `FLOWX_INDEXING_PROCESSINSTANCE_SHARDS`        | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_SHARDS`   | `2`                | `2`                |
| `FLOWX_INDEXING_PROCESSINSTANCE_REPLICAS`      | `FLOWX_ELASTICSEARCH_INDEXSETTINGS_REPLICAS` | `2`                | `0`                |

<Info>
  For complete Elasticsearch indexing setup including Kafka Connect configuration and time-based partitioning, see the [Configuring Elasticsearch indexing](/5.1/setup-guides/flowx-engine-setup-guide/configuring-elasticsearch-indexing/elasticsearch-indexing) guide.
</Info>

## Java runtime configuration

<Note>
  FlowX.AI containers and services must rely exclusively on Java-standard environment variables for runtime tuning.
</Note>

| Deprecated variables             | Standard Replacement | Notes                                                              |
| -------------------------------- | -------------------- | ------------------------------------------------------------------ |
| `JAVA_OPTS`, `JAVA_TOOL_OPTIONS` | `JDK_JAVA_OPTIONS`   | Ensures compatibility with Java 21 and simplifies container config |

<Info>
  Environment-specific memory configurations must now be defined using `JDK_JAVA_OPTIONS`. Avoid relying on `JAVA_OPTS`, `JAVA_TOOL_OPTIONS` or legacy Docker-level overrides — these are no longer processed explicitly.
</Info>

## Config profiles

<Info>
  Config profiles are deprecated since 4.7.6 version.
</Info>

Remove legacy `CONFIG_PROFILE` usage. Delete any `CONFIG_PROFILE` environment variable definitions from deployments. This variable is no longer referenced by FlowX.AI services.

### Development environment exception

<Note>
  For development environments only, `CONFIG_PROFILE` migrates to the standard Spring configuration profile variable.
</Note>

| Remove This Variable | Replace With            | Environment |
| -------------------- | ----------------------- | ----------- |
| `CONFIG_PROFILE`     | `SPRING_CONFIG_PROFILE` | devenv only |

## SpiceDB integration

<Info>
  FlowX.AI 5.1 introduces SpiceDB integration for enhanced authorization capabilities across all core services.
</Info>

### Services affected

The following services require new SpiceDB configuration variables:

* Admin
* Application Manager
* Audit Core
* CMS Core
* Document Plugin
* Integration Designer
* Notification Plugin
* Process Engine
* Runtime Manager
* Task Management Plugin

### New variables to add

For every CAS configuration, add the following variables:

| Variable              | Default Value | Description                                                                                           |
| --------------------- | ------------- | ----------------------------------------------------------------------------------------------------- |
| `FLOWX_SPICEDB_HOST`  | `spicedb`     | SpiceDB server hostname. Change only if your deployment uses a non-default host.                      |
| `FLOWX_SPICEDB_PORT`  | `50051`       | SpiceDB server port. Change only if your deployment uses a non-default port.                          |
| `FLOWX_SPICEDB_TOKEN` | *(secret)*    | SpiceDB authentication token. Add as a Secret to all services connecting to CAS, including Data-Sync. |

## Data sync updates

### Data Sync additional variables

For every Data-Sync configuration, add the following variables:

| Variable                               | Default Value | Description                                                                                           |
| -------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------- |
| `FLOWX_SPICEDB_HOST`                   | `spicedb`     | SpiceDB server hostname. Change only if your deployment uses a non-default host.                      |
| `FLOWX_SPICEDB_PORT`                   | `50051`       | SpiceDB server port. Change only if your deployment uses a non-default port.                          |
| `FLOWX_DATASOURCE_AUTHSYSTEM_URL`      | -             | Authentication system URL.                                                                            |
| `FLOWX_DATASOURCE_AUTHSYSTEM_USERNAME` | -             | Authentication system username.                                                                       |
| `FLOWX_DATASOURCE_AUTHSYSTEM_PASSWORD` | -             | Authentication system password.                                                                       |
| `FLOWX_SPICEDB_TOKEN`                  | -             | SpiceDB authentication token. Add as a Secret to all services connecting to CAS, including Data-Sync. |

## Kafka topic naming

### Global configuration change

| Variable                         | Old Default | New Default | Description                        |
| -------------------------------- | ----------- | ----------- | ---------------------------------- |
| `KAFKA_TOPIC_NAMING_ENVIRONMENT` | (varies)    | `""`        | Moved to default empty environment |

<Info>
  This change standardizes topic naming across environments by defaulting to an empty environment identifier.
</Info>

## CORS and ingress updates

<Warning>
  All services with Kubernetes ingress configurations now require the `Fx-Workspace-Id` header for workspace identification in multi-tenant environments.
</Warning>

### Standard ingress pattern

FlowX.AI v5.1 introduces a standardized ingress configuration pattern for all services. The key change is adding the `Fx-Workspace-Id` header to the CORS configuration.

**Required annotation update:**

```yaml theme={"system"}
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,flowx-platform,Fx-Workspace-Id"
```

### Services requiring updates

All FlowX.AI services that expose ingress endpoints require this update:

| Service              | Fx-Workspace-Id Required | Reference                                                                                       |
| -------------------- | ------------------------ | ----------------------------------------------------------------------------------------------- |
| Admin                | ✅ Yes                    | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration)                          |
| Application Manager  | ✅ Yes                    | [Ingress guide](../../../../..5.1/setup-guides/ingress-configuration)                           |
| Audit Core           | ✅ Yes                    | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration)                          |
| Authorization System | ✅ Yes                    | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration)                          |
| Events Gateway       | ❌ No (SSE)               | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration#events-gateway-exception) |
| Integration Designer | ✅ Yes                    | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration)                          |
| Process Engine       | ✅ Yes                    | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration)                          |
| Runtime Manager      | ✅ Yes                    | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration)                          |
| Task Management      | ✅ Yes                    | [Ingress guide](../../../../../5.1/setup-guides/ingress-configuration)                          |

<Card title="Complete Ingress Configuration Guide" href="../../../../../5.1/setup-guides/ingress-configuration" icon="network-wired">
  View the complete ingress configuration pattern including:

  * Standard template for all services
  * Service-specific paths and rewrite rules
  * Annotation explanations
  * Troubleshooting guide
  * Environment-specific customization
</Card>

<Info>
  **Exception:** Events Gateway does not require the `Fx-Workspace-Id` header because it handles Server-Sent Events (SSE) with different security requirements. See the [Events Gateway exception](../../../../5.1/setup-guides/ingress-configuration#events-gateway-exception) section for details.
</Info>
