Search by

arttecs / murmur

pvrcino

A ReactPHP Server-Sent Events server with a Laravel bridge.

v0.1.3 2026-11-27 23:57 UTC

This package is auto-updated.

Last update: 2026-11-27 23:57:38 UTC


README

Murmur

Tests Packagist Version npm Version PHP Version Documentation License

Murmur is a ReactPHP Server-Sent Events (SSE) server with a Laravel bridge. An SSE subscription can stay open for minutes or hours. When Laravel serves the stream directly through PHP-FPM, that connection holds a worker for its lifetime. Murmur keeps subscriptions in a separate, long-running process. Laravel publishes events over HTTP or Redis and continues serving requests with its workers available.

  • No held workers. Subscriptions live in one event-loop process; PHP-FPM and Octane workers stay free.
  • Laravel broadcasting. A murmur broadcaster, private channels authorized by Laravel's own /broadcasting/auth, toOthers(), and a Laravel Echo connector.
  • Replay on reconnect. Clients resume from their last event ID, and are told when history was lost.
  • Scales out. Redis Streams share events and history across any number of Murmur nodes.
  • Closed by default. Signed publishing, an empty origin allowlist, no metrics route, and optional features off until enabled.
  • Observable. Health and readiness endpoints, Prometheus-format metrics, optional persisted snapshots, and connection lifecycle events.

Requirements

Murmur requires PHP 8.3 or later and Laravel 12 or 13. The server runs on Linux and macOS; Windows is not supported.

Installation

composer require arttecs/murmur
php artisan murmur:install

The installer publishes config/murmur.php and sets up your application's Murmur environment.

Quick start

Start the server from your Laravel application directory.

php artisan murmur:serve

Open a public subscription in a separate terminal.

curl -N 'http://127.0.0.1:8080/sse?topics=news'

To subscribe from your browser application, install the client with npm install @arttecs/murmur and listen on the news channel. If the browser application uses a different origin from the SSE server, add its origin to MURMUR_ALLOWED_ORIGINS.

import { Murmur } from '@arttecs/murmur'

const murmur = new Murmur({ url: 'http://127.0.0.1:8080/sse' })

const news = murmur.channel('news')
news.listen('.updated', data => console.log(data))

Once the subscription has attached, publish an event from your Laravel application.

use Arttecs\Murmur\Facades\Murmur;

Murmur::publish('news', 'updated', ['title' => 'New release']);

Documentation

Read the Murmur documentation.

Changelog

See the changelog.

Contributing

Send code contributions to this repository and documentation changes to arttecs/murmur-docs. See the contributing guide and code of conduct.

Security

Report vulnerabilities privately following the security policy.

License

Murmur is released under the MIT License.