PHPackages                             flux-eco/global-stream - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. flux-eco/global-stream

ActiveFlux-app[Utility &amp; Helpers](/categories/utility)

flux-eco/global-stream
======================

Stores cross domain events and publishes them to subscribed consumers

1.0.1(4y ago)0392GPL-3.0-onlyPHPPHP &gt;=8.0

Since Apr 2Pushed 4y agoCompare

[ Source](https://github.com/flux-eco/global-stream)[ Packagist](https://packagist.org/packages/flux-eco/global-stream)[ Docs](https://fluxlabs.ch)[ RSS](/packages/flux-eco-global-stream/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (2)

flux-eco/global-stream
======================

[](#flux-ecoglobal-stream)

Stores cross domain events and publishes them to subscribed consumers. It is a very early stage of development and is primarily intended to illustrate the use of global streams. For large systems, apache kafka or similar is more suitable.

The following example application demonstrates the usage:

Usage
-----

[](#usage)

.env

```
STREAM_STORAGE_CONFIG_ENV_PREFIX=STREAM_
STREAM_STORAGE_NAME=stream
STREAM_STORAGE_HOST=localhost
STREAM_STORAGE_DRIVER=Pdo_Mysql
STREAM_STORAGE_USER=user
STREAM_STORAGE_PASSWORD=password
STREAM_TABLE_NAME=stream
STREAM_STATE_SCHEMA_FILE=../schemas/State.yaml

```

schemas\\domain\\account.yaml

```
title: account
type: object
properties:
    aggregateId:
        type: string
        readOnly: true
    correlationId:
        type: string
        readOnly: true
    aggregateName:
        type: string
        const: todo
        readOnly: true
    sequence:
        type: integer
        readOnly: true
    createdDateTime:
        type: string
        format: date-time
        readOnly: true
    createdBy:
        type: string
        format: email
        readOnly: true
    changedDateTime:
        type: string
        format: date-time
        readOnly: true
    changedBy:
        type: string
        format: email
        readOnly: true
    rootObjectSchema:
        type: string
        const: v1
    rootObject:
        type: object
        properties:
            firstname:
                type: string
            lastname:
                type: string

```

example.php

```
