随笔分类 -  06-中间件

摘要:1、查看RabbitMQ和Erlang版本对应关系 https://www.rabbitmq.com/which-erlang.html 2、下载安装Erlang Downloads - Erlang/OTP a、安装过程简单,直接一路下一步 b、设置系统参数 ERLANG_HOME:安装路径,bi 阅读全文
posted @ 2022-10-19 23:30 hangxing.pang 阅读(220) 评论(0) 推荐(0)
摘要:学习地址:https://masuit.com/1192?kw=Autofac 强烈推荐勤快哥的小站https://masuit.com 资源多多 整体代码结构如下: 一、简单默认方式注入 1、IService using System; using System.Collections.Gener 阅读全文
posted @ 2020-12-18 15:51 hangxing.pang 阅读(198) 评论(1) 推荐(0)
摘要:在yisha框架的使用中,对定时任务进行了微调。 1、定时任务放在API程序中,直接挪到web程序中 new JobCenter().Start(); // 定时任务 2、DisallowConcurrentExecution注解的添加 //DisallowConcurrentExecution属性 阅读全文
posted @ 2020-12-18 15:35 hangxing.pang 阅读(488) 评论(1) 推荐(0)
摘要:1、短连接:basicget 独自去获取message request的方式去获取,断开式的2、长连接:eventbasicconsumer 【订阅式】 queuebasiccunsumer 队列式的,被弃用 《1》、确认机制 不管你是否确认,消息先全部打入你的consumer中 《2》、QOS = 阅读全文
posted @ 2020-09-22 14:00 hangxing.pang 阅读(382) 评论(0) 推荐(0)
摘要:一、message中的CreateBasicProperties 1、在之前的文章中,使用了很多这个属性 2、持久化 exchange,queue的时候,都有一个持久化的概念,mnesia,保存在数据库中去了 message呢,能否持久化呢 Persistent=true 持久化 二、lazy qu 阅读全文
posted @ 2020-09-22 13:26 hangxing.pang 阅读(462) 评论(0) 推荐(0)
摘要:1、消费端确认 自动确认:message出队列的时候自动确认【broke】 手动确认:message出队列之后,要应用程序去确认是否已经消费完毕 basic提供了哪些方法来做这些事情 1)、自动确认 BasicGet("mytest",true); 2)、手动确认 BasicGet("mytest" 阅读全文
posted @ 2020-09-22 11:50 hangxing.pang 阅读(199) 评论(0) 推荐(0)
摘要:何为Dead lettermax_length: 1)queue长度限制 【mongodg oplog】就是一个固定集合 2)queue中的message过期时间 3)basicreject basicnack等等一、Dead letter exchange有时候我们不希望message被drop掉 阅读全文
posted @ 2020-09-22 11:02 hangxing.pang 阅读(191) 评论(0) 推荐(0)
摘要:1:queue1)、QueueDeclare 声明队列QueueDeclareOk QueueDeclare(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string, object> argume 阅读全文
posted @ 2020-09-22 09:37 hangxing.pang 阅读(2300) 评论(0) 推荐(0)
摘要:1、exchange [topic]1)direct 提前预知性的binding info、error、debug、warnning=》exchange2)fanout 群发性的binding3)headers and、or性质的binding x-match4)topic 归类性的binding【 阅读全文
posted @ 2020-09-17 11:25 hangxing.pang 阅读(331) 评论(0) 推荐(0)
摘要:1、exchange中的headers的使用headers是采用muliple attributes代替routing keyx-match[all/any] all:所有的header头信息必须匹配 any:只要一个匹配即可direct 只需要匹配一个routing key即可而现在的header 阅读全文
posted @ 2020-09-16 16:44 hangxing.pang 阅读(871) 评论(0) 推荐(1)
摘要:1、exchange [fanout] 多播 应用场景 1)订单流程:提交订单后,同时发送短信和邮件 2)cs软件弹出消息 普通情况下,使用轮询方式,在cs中绑定fanout exchange,如果存在消息,及时推送 3)客户关怀和千人千面 taobao=> 催付,付款后提醒、发货提醒、签收提醒 = 阅读全文
posted @ 2020-09-16 15:48 hangxing.pang 阅读(437) 评论(0) 推荐(0)
摘要:1、简单设置场景 需要一个日志系统,使用RabbitMQ推送 日志等级要求如下: Log levels debug、info、warning、error、none 2、代码实现 1)生产者 //基础配置 ConnectionFactory factory = new ConnectionFactor 阅读全文
posted @ 2020-09-16 15:04 hangxing.pang 阅读(669) 评论(0) 推荐(0)
摘要:1、交换机 exchange [direct,fanout,headers,topic ]direct:work queues和routing都是直连场景BasicGet:主动的去拉取。1)work queues:默认轮询使用 subscribe和publish 发布、订阅的方式 EventingB 阅读全文
posted @ 2020-09-16 13:47 hangxing.pang 阅读(488) 评论(0) 推荐(0)
摘要:系列的视频: https://www.bilibili.com/video/BV1jJ411V7Do 1、需要引用相关组件 Nuget查找RabbitMQ.Client,并引用 2、基础代码 1)生产者 //基础配置 ConnectionFactory factory = new Connectio 阅读全文
posted @ 2020-09-16 13:36 hangxing.pang 阅读(191) 评论(0) 推荐(1)