定制 stegeman/symfony-messenger-cloud-events 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stegeman/symfony-messenger-cloud-events

最新稳定版本:1.1.4

Composer 安装命令:

composer require stegeman/symfony-messenger-cloud-events

包简介

Symfony Messenger Cloud Events

README 文档

README

Install

composer require stegeman/symfony-messenger-cloud-events

Enable the bundle in your kernel:

bundles.php

return [
    ...
    Stegeman\Messenger\CloudEvents\CloudEventsBundle::class => ['all' => true],
    ...
];

Configuration

Configure the correct serializer for your transport:

transports:
    async:
        ...
        serializer: 'Stegeman\Messenger\CloudEvents\Serializer\CloudEventsSerializer'
    ...

To prevent your messages will be mapped to a PHP namespace each message must be named and matched with a message. This can be done by adding name -> class mapping to your configuration (config/packages/cloud_events.yaml) :

cloud_events:
  registry:
    - name: "test-event"
      className: "App\\Domain\\Event\\TestEvent"

Now it is known which name to map to which class. This is necessary for both serializing as deserializing.

This is all that is needed to get started.

All set, go!

Override services

It is possible to override the normalizer service. This can be done by adding the following to your configuration (config/packages/cloud_events.yaml):

    cloud_events:
      ...
      normalizer_service_id: name.of.your.own.normalizer.service

统计信息

  • 总下载量: 652
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-04