1 Star 5 Fork 1

张海波 / Naruto.Subscribe

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Naruto.Subscribe

介绍

发布订阅

软件架构

  1. 基于 net core 3.1
  2. Redis使用的是自己根据StackExchanges.Redis封装的仓储 https://gitee.com/haiboi/Naruto.Data
  3. Rabbit 使用的RabbitMQ.Client
  4. kafka使用的Confluent.Kafka

安装教程

  1. 安装 Naruto.Subscribe 核心包
  2. 安装 Naruto.Subscribe.Provider.Redis ,基于redis的发布订阅
  3. 安装 Naruto.Subscribe.Provider.RabbitMQ ,基于RabbitMQ的发布订阅,使用的是Direct 直连交换机
  4. 安装 Naruto.Subscribe.Provider.Kafka ,基于kafka的发布订阅

使用说明

  1. 当前框架 已经实现了redis版本的消息订阅,和rabbitmq,以及kafka的消息订阅,更多mq的订阅正在接入中
    1.1 使用redis提供者的时候,当消息处理失败的时候,将会隔10分钟进行重试
    1.2 redis每条消息只能有一个消费者处理消息
    1.3 rabbitmq使用的是direct交换机模式
  1. 如果需要实现自己的订阅方式,需要实现接口 INarutoPublish发布接口,和ISubscribeEvent订阅接口
  2. 书写自己的订阅业务的时候,需要继承ISubscribe接口,继承此接口的对象自动会注入生命周期为Scope的对象,可以使用DI的功能
  3. subscribe
  4. 给需要订阅的方法标记Subscribe特性
  5. 使用NarutoMessageAopEvent,可以处理消息发送前后的aop事件
  6. 注入方法

    use

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
MIT License Copyright (c) 2020 也许所谓 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

本项目是一个基于.net core 开发的事件总线 展开 收起
C#
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/haiboi/naruto.-subscribe.git
git@gitee.com:haiboi/naruto.-subscribe.git
haiboi
naruto.-subscribe
Naruto.Subscribe
master

搜索帮助

14c37bed 8189591 565d56ea 8189591