Skip to content

Commit 7c6fb84

Browse files
committed
Clarify the message loader
1 parent 366e019 commit 7c6fb84

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

docs/pages/subscription.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,13 +838,28 @@ In order for the subscription engine to be able to do its work, you have to asse
838838
### Message Loader
839839

840840
The subscription engine needs a message loader to load the messages.
841-
We provide two implementations by default.
841+
We provide three implementations by default.
842842
Which one has a better performance depends on the use case.
843843

844844
!!! tip
845845

846-
We recommend the `GapResolverStoreMessageLoader` as it handles gaps in the stream.
846+
We recommend the recent `GapResolverStoreMessageLoader` as it handles gaps in the stream.
847+
848+
!!! note
849+
850+
If you followed the confiration in the [Getting Started](./getting_started.md#configuration) section,
851+
the Message Loader implementation replaces the $eventStore in the DefaultSubscriptionEngine.
847852

853+
```php
854+
$messageLoader = // whatever implementation you choose
855+
$engine = new DefaultSubscriptionEngine(
856+
- $eventStore,
857+
+ $messageLoader,
858+
$subscriptionStore,
859+
$subscriberRepository,
860+
);
861+
```
862+
848863
#### Store Message Loader
849864

850865
The store message loader loads all the messages from the event store.

0 commit comments

Comments
 (0)