PHPackages                             alazziaz/laravel-dapr-listener - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. alazziaz/laravel-dapr-listener

ActiveLibrary[Queues &amp; Workers](/categories/queues)

alazziaz/laravel-dapr-listener
==============================

Listener utilities for consuming Dapr Pub/Sub messages as Laravel events.

v2.1.1(4mo ago)10MITPHPPHP ^8.2

Since Oct 28Pushed 4mo agoCompare

[ Source](https://github.com/alazzi-az/laravel-dapr-listener)[ Packagist](https://packagist.org/packages/alazziaz/laravel-dapr-listener)[ RSS](/packages/alazziaz-laravel-dapr-listener/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (35)Used By (0)

Dapr Events Listener
====================

[](#dapr-events-listener)

[![Packagist Version](https://camo.githubusercontent.com/04c97f2bf6791552434670e218bc1e573cb4b854f51647e2b6d32ed9169edcab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c617a7a69617a2f6c61726176656c2d646170722d6c697374656e65722e7376673f636f6c6f723d306636616234)](https://packagist.org/packages/alazziaz/laravel-dapr-listener)[![Total Downloads](https://camo.githubusercontent.com/264b8d4df6ecec012ad28b9a8dc80238f606152ff0d7360439e85e4db987f32c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c617a7a69617a2f6c61726176656c2d646170722d6c697374656e65722e737667)](https://packagist.org/packages/alazziaz/laravel-dapr-listener)

Discover Dapr topics, expose `/dapr/subscribe`, and handle ingress HTTP calls by re-dispatching Laravel events.

Installation
------------

[](#installation)

```
composer require alazziaz/laravel-dapr-listener
```

> Depends on `alazziaz/laravel-dapr-foundation` for shared infrastructure.

Subscription discovery
----------------------

[](#subscription-discovery)

The service provider scans `app/Events` and `app/Listeners` for the `#[Topic]` attribute and registers derived topics with the shared `SubscriptionRegistry`. Configured overrides in `config/dapr.php` are merged automatically.

Run `php artisan dapr:list` to inspect the discovered routes.

HTTP ingress
------------

[](#http-ingress)

Routes are registered under the configurable prefix (default `dapr`):

- `GET /dapr/subscribe` – list of `{pubsubname, topic, route}` subscriptions.
- `POST /dapr/ingress/{topic?}` – wildcard handler invoked by the Dapr sidecar.

Requests may be wrapped in CloudEvents; the listener extracts the payload, hydrates the Laravel event class, and dispatches it through the application event dispatcher. Inbound events are marked so they are not re-published.

Listener middleware
-------------------

[](#listener-middleware)

Configured through `listener.middleware`:

- `RetryOnceMiddleware` – retries the pipeline a single time before surfacing the exception (causing Dapr to retry based on component settings).
- `CorrelatedMessageMiddleware` – restores correlation IDs from metadata for logging and downstream services.
- `TenantHydratorMiddleware` – exposes tenant context via the Laravel context facade.

Artisan tooling
---------------

[](#artisan-tooling)

`php artisan dapr:listener App\\Events\\OrderPlaced` scaffolds a listener class in `app/Listeners`, defaulting to `OrderPlacedListener`.

The stub integrates cleanly with Laravel's native event system—no special base classes required.

PHP compatibility note
----------------------

[](#php-compatibility-note)

The listener depends on `dapr/php-sdk`, which currently only offers a `dev-main` branch targeting PHP 8.4. Projects running on PHP 8.2/8.3 should either loosen Composer’s minimum stability (while keeping `prefer-stable: true`) or pin the SDK to an earlier tag that supports their PHP version until a stable release is available.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance77

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

34

Last Release

125d ago

Major Versions

v1.0.1 → v2.0.02025-10-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/750a1566a9f2ed8de9e8da9fee372b4426d7585bfdabdb65a1932a40e409a3e3?d=identicon)[alazzi](/maintainers/alazzi)

---

Top Contributors

[![mohammedazman](https://avatars.githubusercontent.com/u/56982649?v=4)](https://github.com/mohammedazman "mohammedazman (14 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alazziaz-laravel-dapr-listener/health.svg)

```
[![Health](https://phpackages.com/badges/alazziaz-laravel-dapr-listener/health.svg)](https://phpackages.com/packages/alazziaz-laravel-dapr-listener)
```

###  Alternatives

[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[illuminate/bus

The Illuminate Bus package.

6043.8M409](/packages/illuminate-bus)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
