Download the PHP package uzapoint/eventbus-core without Composer

On this page you can find all versions of the php package uzapoint/eventbus-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eventbus-core

Uzapoint EventBus Core

Reusable Event Bus infrastructure for Laravel microservices, built on RabbitMQ with Redis-backed idempotency.

Repository: https://github.com/uzapoint/eventbus-core


Features


Installation

Requirements: PHP 8.4+, Laravel 11/12, RabbitMQ, Redis (phpredis or predis), pcntl.


Configuration

A service only defines what is specific to it. All other settings come from the package defaults and are merged key by key, so override only what you need (for example 'consumer' => ['prefetch_count' => 5]).

To see every available option: php artisan vendor:publish --tag=eventbus-config.

Every default can also be set per environment with an EVENTBUS_* variable:

Variable Default
EVENTBUS_DLX_ENABLED / EVENTBUS_DLX_TTL / EVENTBUS_MAX_RETRIES true / 86400000 / 3
EVENTBUS_IDEMPOTENCY_ENABLED / _TTL / _LOCK_TTL / _PREFIX true / 3600 / 120 / event:processed:
EVENTBUS_PREFETCH_COUNT / EVENTBUS_HEARTBEAT 1 / 60
EVENTBUS_CONNECTION_TIMEOUT / EVENTBUS_READ_WRITE_TIMEOUT 3 / 130
EVENTBUS_LIVENESS_DIR storage/framework/eventbus
EVENTBUS_PUBLISHER_CONNECTION_TIMEOUT / _READ_WRITE_TIMEOUT / _CONFIRM_TIMEOUT 3 / 15 / 10
EVENTBUS_MONITORING_ENABLED / EVENTBUS_SLOW_EVENT_THRESHOLD true / 5000

Do not bind your own EventProcessor; retries and idempotency are handled by the package.


Publishing Events

Envelope:

Publishing connects with publisher.connection_timeout, read_write_timeout and confirm_timeout, and drops its connection after any failure. A failed publish throws.


Consuming Events

Run it under supervisor with autorestart=true. Include the shared programs from the package (two consumers plus the watchdog) from the service's supervisord.conf:

It needs SERVICE_NAME in the container environment and a writable storage/.

Failures

A failing handler is retried dead_letter.max_retries times (2, 4, 6 s backoff), then the message is parked in <queue>.dlq. Alert on any message in a .dlq queue.

Handlers that are queued jobs (ShouldQueue) only enqueue work. Their later failures go to Horizon's failed_jobs, not back to RabbitMQ. Use a plain handler class for critical flows.


Idempotency

Namespace the prefix per service (for example event:processed:sales:) when several services consume the same message.


Watchdog

Each consumer touches eventbus-<pid>.alive in consumer.liveness_dir (default storage/framework/eventbus) at least every ~5 s. ops/eventbus-watchdog.sh kills a consumer whose file is older than STALE_AFTER (120 s) and supervisor starts a new one.


Service checklist

Check all of it, plus handlers, topology, Redis and RabbitMQ:


Monitoring


License

MIT

Author

Sammy Orondo Lead Developer — Uzapoint https://github.com/sammy-boy


All versions of eventbus-core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0
php-amqplib/php-amqplib Version ^3.0
ext-pcntl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uzapoint/eventbus-core contains the following files

Loading the files please wait ...