Skip to content
Permalink
Branch: master
Commits on Mar 24, 2020
  1. Merge pull request #263 from bwaidelich/bugfix/relax-DefaultEventToLi…

    bwaidelich committed Mar 24, 2020
    …stenerMappingProvider-checks
    
    BUGFIX: Relax DefaultEventToListenerMappingProvider checks
Commits on Mar 23, 2020
  1. Merge pull request #262 from bwaidelich/bugfix/261-release-highest-ap…

    bwaidelich committed Mar 23, 2020
    …plied-sequence-number-during-catchup
    
    !!! BUGFIX: Release "highest applied sequence number" during catchup
  2. BUGFIX: Relax DefaultEventToListenerMappingProvider checks

    bwaidelich committed Mar 23, 2020
    With #256 the `DefaultEventToListenerMappingProvider` was introduced
    with a very defensive behavior that prevents event store configurations
    without matching Listeners.
    
    This was taking it a little far and creates a hen-egg situation for the
    initial setup because it requires an `EventListenerInterface` instance
    to exist before a store can be configured.
    
    With this change it's allowed to leave out the `listeners` configuration:
    
    ```yaml
    Neos:
      EventSourcing:
        EventStore:
          stores:
            'event-store':
              storage: 'Neos\EventSourcing\EventStore\Storage\Doctrine\DoctrineEventStorage'
    ```
    
    If one is specified it is still validated of course, so the follwing example will lead
    to an exception if no EventListener exists yet:
    
    ```yaml
    Neos:
      EventSourcing:
        EventStore:
          stores:
            'event-store':
              storage: 'Neos\EventSourcing\EventStore\Storage\Doctrine\DoctrineEventStorage'
              listeners:
                '.*': true
    ```
  3. Tweak EventListenerInvokerTest

    bwaidelich committed Mar 23, 2020
    ..and prepare for PhpUnit 9 compatibility
Commits on Mar 20, 2020
  1. !!! BUGFIX: Release "highest applied sequence number" during catchup

    bwaidelich committed Mar 20, 2020
    Previously the whole `EventListenerInvoker::catchup()` call triggered a
    single blocking transaction that was only committed when the corresponding
    event listener was up to date with the event store.
    Especially for replays and initial catchups this posed a problem because
    of the ever growing transaction.
    
    With this change the "Highest Applied Sequence Number" is released after
    each applied event.
    This has the nice side effect that multiple workers can share the load:
    While process 1 commits the transaction, process 2 can already start processing
    the next event.
    
    For batch-processing the batch size can be increased in order to improve performance:
    
        $eventListenerInvoker = (new EventListenerInvoker($eventStore, $listener, $connection))
           ->withTransactionBatchSize(500)
           ->catchup()
    
    This is a breaking change because the signature of the `EventListenerInvoker` has
    changed slightly:
    
    Previously:
    
        $eventListenerInvoker = new EventListenerInvoker($eventStore);
        $eventListenerInvoker->catchup($listener, $progressCallback);
    
    Now:
    
        $eventListenerInvoker = new EventListenerInvoker($eventStore, $listener, $connection);
        $eventListenerInvoker->onProgress($eventListenerInvoker);
        $eventListenerInvoker->catchup();
    
    Fixes: #261
You can’t perform that action at this time.