federicozardi/eventing-laravel
Composer 安装命令:
composer require federicozardi/eventing-laravel
包简介
Laravel integration for federicozardi/eventing: prebuilt EventBridge webhook with HMAC authentication and handler dispatch.
README 文档
README
Laravel integration for federicozardi/eventing.
Provides a prebuilt webhook endpoint for EventBridge HTTP targets:
- HMAC authentication (
X-Eventing-Timestamp,X-Eventing-Signature) - JSON envelope parsing + validation
- Idempotency via DynamoDB inbox (dedupe on
consumer + eventId) - Handler dispatch by
eventType
V1 processing is sync (as agreed). EventBridge retry policy handles transient failures.
Install
composer require federicozardi/eventing-laravel
php artisan vendor:publish --tag=config --provider="Amevista\\EventingLaravel\\Providers\\EventingServiceProvider"
Configuration
config/eventing.php:
webhook.path(default:/api/events/webhook)webhook.secret(EVENTING_WEBHOOK_SECRET)consumer_name(EVENTING_CONSUMER_NAME)inbox.table(EVENTING_INBOX_TABLE)event_store.disable_concurrency_check(EVENTING_DISABLE_CONCURRENCY_CHECK, default:true)handlers[eventType] => HandlerClass
Env vars (typical):
EVENTING_WEBHOOK_SECRET=supersecret
EVENTING_CONSUMER_NAME=payment-service
EVENTING_INBOX_TABLE=eventing_inbox
EVENTING_DISABLE_CONCURRENCY_CHECK=true
AWS_DEFAULT_REGION=eu-west-3
Handlers
Create a handler implementing Amevista\\Eventing\\Contracts\\EventHandlerInterface:
use Amevista\\Eventing\\Contracts\\EventHandlerInterface;
use Amevista\\Eventing\\Envelope\\EventEnvelope;
final class OrderCreatedHandler implements EventHandlerInterface
{
public function handle(EventEnvelope $event): void
{
// ...
}
}
Map it in config:
'handlers' => [
'order.created.v1' => \\App\\EventHandlers\\OrderCreatedHandler::class,
],
IaC notes (EventBridge → ALB Ingress)
This package assumes your IaC creates:
- EventBridge rule(s) matching
detail-type/source - HTTP target pointing to your ALB ingress URL + path
- Retry policy and (optionally) DLQ
- Secret management for
EVENTING_WEBHOOK_SECRET(Kubernetes Secret)
With ALB Ingress, do not rely on static IP allowlists as primary authentication; use HMAC.
IAM notes (consumer)
This package performs inbox dedupe (DynamoDB PutItem) before dispatching handlers.
If EVENTING_DISABLE_CONCURRENCY_CHECK=true (default), the event store may also read the event store HEAD
(dynamodb:GetItem) to append events best-effort.
Minimal DynamoDB permissions typically include:
- Inbox table:
dynamodb:PutItem - Event store table:
- transactional writes:
dynamodb:PutItem,dynamodb:UpdateItem,dynamodb:ConditionCheckItem - reads:
dynamodb:GetItem(forHEADwhen concurrency checks are disabled),dynamodb:Query(for loads)
- transactional writes:
Monorepo development note
In this monorepo the composer.json uses a path repository to resolve federicozardi/eventing locally. When you extract to separate repositories and tag releases, you should remove that block.
federicozardi/eventing-laravel 适用场景与选型建议
federicozardi/eventing-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 federicozardi/eventing-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 federicozardi/eventing-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 40
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-30