diff --git a/docs/cdp/cdp_activation/cdp_data_export.md b/docs/cdp/cdp_activation/cdp_data_export.md index 8941a83e86..6b4b417e53 100644 --- a/docs/cdp/cdp_activation/cdp_data_export.md +++ b/docs/cdp/cdp_activation/cdp_data_export.md @@ -134,6 +134,42 @@ Finally, you can specify the audiences you wish to include. All CDP requests are logged in with `debug` severity. +### [[= product_name_base =]] Messenger support for large batches of data + +CDP uses [[= product_name_base =]] Messenger to process incoming data from [Raptor](https://www.raptorservices.com/). +This approach improves performance and reliability when processing large amounts of CDP user records. +For more information, see [Background tasks: How it works](background_tasks.md#how-it-works). + +By using Messenger while working with large batches of data, requests are queued instead of being processed synchronously: + +- queuing items starts automatically once a certain number of actions is reached (below this number, items are processed in a single request, using the standard synchronous behavior) +- every single data is recorded in the database +- a background worker retrieves records from the queue, processing them one by one or in batches, depending on the [Messenger]([[= symfony_doc =]]/messenger.html) configuration +- processing happens at set intervals to avoid timeouts and keep the system stable + +1\. Make sure that the transport layer is [defined properly](background_tasks.md#configure-package) in [[= product_name_base =]] Messenger configuration. + +2\. Add `bulk_async_threshold` setting in the `config/packages/ibexa_cdp.yaml` configuration: + +``` bash +ibexa_cdp: + bulk_async_threshold: 100 # Default: 100 items +``` + +Available options: + +- `bulk_async_threshold` (integer, default: 100) - minimum number of items required to trigger asynchronous processing + - below threshold - items are processed immediately in a single request, using the standard synchronous behavior + - at/above threshold - items are automatically dispatched to the asynchronous queue for background processing + +3\. Make sure that the [worker starts](background_tasks.md#start-worker) together with the application to watch the transport bus: + +``` bash +php bin/console messenger:consume ibexa.messenger.transport --bus=ibexa.messenger.bus +``` + +For more information, see [Start background task worker](background_tasks.md#start-worker). + ### CDP Monolog channel CDP Monolog channel handles webhook logs for easier separation of logs. @@ -150,7 +186,7 @@ It can be configured in both `dev` and `prod` environments, for example: ```yaml monolog: - handlers: + handlers: cdp_webhook: type: stream path: "%kernel.logs_dir%/cdp_webhook_%kernel.environment%.log" diff --git a/docs/cdp/cdp_data_export_schedule.md b/docs/cdp/cdp_data_export_schedule.md index 7102d57bc7..49c94078e5 100644 --- a/docs/cdp/cdp_data_export_schedule.md +++ b/docs/cdp/cdp_data_export_schedule.md @@ -65,4 +65,4 @@ php bin/console ibexa:cdp:stream-product-data --help ```bash php bin/console ibexa:cdp:stream-content-data --help -``` \ No newline at end of file +``` diff --git a/docs/update_and_migration/from_4.6/update_from_4.6.md b/docs/update_and_migration/from_4.6/update_from_4.6.md index 6f33fe174b..dd9a112d0e 100644 --- a/docs/update_and_migration/from_4.6/update_from_4.6.md +++ b/docs/update_and_migration/from_4.6/update_from_4.6.md @@ -566,6 +566,11 @@ If you do, add the required dependencies to your project: composer require guzzlehttp/guzzle:^6.5 php-http/guzzle6-adapter:^2.0 ``` +### Messenger support in CDP + +If you're using [CDP](cdp.md) and haven't configured Ibexa Messenger yet, do so now. +Follow the [Messenger setup instructions](https://doc.ibexa.co/en/4.6/infrastructure_and_maintenance/background_tasks/#install-package) to continue. + [[% include 'snippets/update/notify_support.md' %]]