Skip to content
38 changes: 37 additions & 1 deletion docs/cdp/cdp_activation/cdp_data_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/cdp/cdp_data_export_schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ php bin/console ibexa:cdp:stream-product-data --help

```bash
php bin/console ibexa:cdp:stream-content-data --help
```
```
5 changes: 5 additions & 0 deletions docs/update_and_migration/from_4.6/update_from_4.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,11 @@
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.

Check failure on line 571 in docs/update_and_migration/from_4.6/update_from_4.6.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/update_and_migration/from_4.6/update_from_4.6.md#L571

[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'
Raw output
{"message": "[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'", "location": {"path": "docs/update_and_migration/from_4.6/update_from_4.6.md", "range": {"start": {"line": 571, "column": 54}}}, "severity": "ERROR"}
Follow the [Messenger setup instructions](https://doc.ibexa.co/en/4.6/infrastructure_and_maintenance/background_tasks/#install-package) to continue.

<!-- End of update instructions -->

[[% include 'snippets/update/notify_support.md' %]]
Expand Down