go语言nsq源码解读九 tcp和http中channel、topic的增删
通过前面多篇文章,nsqlookupd基本已经解读完毕了,不过在关于channel和topic的增删上还比较模糊,所以本篇将站在宏观的角度来总结一下,tcp.go和http.go两个文件中关于channel和topic的操作有哪些。
总结如下表:
模块 | 文件 | 所在方法名 | 调用方法 | Registration | ||
Category | Key | SubKey | ||||
TCP | lookup_protocol_v1.go | REGISTER | AddProducer | “channel” | topic | channel |
AddProducer | “topic” | topic | “” | |||
UNREGISTER | RemoveProducer | “channel” | topic | channel | ||
RemoveProducer | “channel” | topic | “*” | |||
RemoveProducer | “topic” | topic | “” | |||
IDENTIFY | AddProducer | “client” | “” | “” | ||
HTTP | http.go | topicsHandler | FindRegistrations | “topic” | “*” | “” |
channelsHandler | FindRegistrations | “channel” | topicName | “*” | ||
lookupHandler | FindRegistrations | “channel” | topicName | “*” | ||
FindRegistrations | “topic” | topicName | “” | |||
createTopicHandler | AddRegistration | “topic” | topicName | “” | ||
deleteTopicHandler | RemoveRegistration | “channel” | topicName | “*” | ||
RemoveRegistration | “topic” | topicName | “” | |||
tombstoneTopicProducerHandler | FindProducers | “topic” | topicName | “” | ||
createChannelHandler | AddRegistration | “channel” | topicName | channelName | ||
AddRegistration | “topic” | topicName | “” | |||
deleteChannelHandler | RemoveRegistration | “channel” | topicName | channelName | ||
nodesHandler | FindProducers | “client” | “” | “” | ||
LookupRegistrations | “topic” | “*” | “” | |||
FindProducers | “topic” | t | “” |
go语言nsq源码解读九 tcp和http中channel、topic的增删的更多相关文章
- go语言nsq源码解读六 tcp.go、tcp_server.go
本篇讲nsqlookupd中tcp.go.tcp_server.go tcp_server.go位于util目录下. 12345678910111213141516171819202122232425 ...
- go语言nsq源码解读八 http.go、http_server.go
这篇讲另两个文件http.go.http_server.go,这两个文件和第六讲go语言nsq源码解读六 tcp.go.tcp_server.go里的两个文件是相对应的.那两个文件用于处理tcp请求, ...
- (转)go语言nsq源码解读二 nsqlookupd、nsqd与nsqadmin
转自:http://www.baiyuxiong.com/?p=886 ---------------------------------------------------------------- ...
- go语言 nsq源码解读三 nsqlookupd源码nsqlookupd.go
从本节开始,将逐步阅读nsq各模块的代码. 读一份代码,我的思路一般是: 1.了解用法,知道了怎么使用,对理解代码有宏观上有很大帮助. 2.了解各大模块的功能特点,同时再想想,如果让自己来实现这些模块 ...
- go语言nsq源码解读七 lookup_protocol_v1.go
本篇将解读nsqlookup处理tcp请求的核心代码文件lookup_protocol_v1.go. 1234567891011121314151617181920212223242526272829 ...
- go语言nsq源码解读二 nsqlookupd、nsqd与nsqadmin
nsqlookupd: 官方文档解释见:http://bitly.github.io/nsq/components/nsqlookupd.html 用官方话来讲是:nsqlookupd管理拓扑信息,客 ...
- go语言nsq源码解读一-基本介绍
简单介绍一下nsq. 参考 http://feilong.me/2013/05/nsq-realtime-message-processing-system 的介绍:NSQ是由知名短链接服务商bitl ...
- go语言 nsq源码解读四 nsqlookupd源码options.go、context.go和wait_group_wrapper.go
本节会解读nsqlookupd.go文件中涉及到的其中三个文件:options.go.context.go和wait_group_wrapper.go. options.go 123456789101 ...
- go语言nsq源码解读五 nsqlookupd源码registration_db.go
本篇将讲解registration_db.go文件. 1234567891011121314151617181920212223242526272829303132333435363738394041 ...
随机推荐
- properties类是Hashtable的子类
properties类是Hashtable的子类 增加了将Hashtable对象中的关键字保存到文件和从文件中读取关键字和值到Hashtable对象中的方法 Properties.store方法存储P ...
- MySQL 库名重命名
MySQL ( RENAME database olddbname TO newdbname ) 对库名的重命名上会出现一些奇怪的错误.有丢失数据的风险. 所以如何去重命名呢: 1 用mysqldu ...
- Git分支创建与合并
分支管理是Git支持多人协作和版本控制的关键,参照廖雪峰对Git的介绍,对真实开发环境中Git的使用结合实践进行梳理. 摘自:廖雪峰的官方网站 在实际开发中,我们应该按照几个基本原则进行分支管理: 首 ...
- datetime的精度
最近有需要将分钟线的数据进行内联拼接,但时间没有必要精确到秒,微秒. df['datetime'] = pd.to_datetime(df['datetime']) df = df.set_index ...
- 使用AngularJS开发中的几个问题
1.AngularJS的模板绑定机制好像和其$http服务也有一定关系,如果用jQuery Ajax的返回值赋给$scope的作用域变量,整个绑定显示的节奏慢一个事件,神器果然麻烦啊. 2.对hidd ...
- ffmpeg转换参数和压缩输出大小的比率 参考 最新版本FFMPEG
https://blog.cnlabs.NET/3668.html ffmpeg 转换压缩比例 FFMPEG如果是压缩为FLV文件 3个编码可选1. -c:v flv 标准FLV编码 这个好处是速度快 ...
- bootstrap响应式设计简单实践。
首先需要熟悉Boostrap提供的响应式设施:http://getbootstrap.com/css/#responsive-utilities,BootStrap的响应式设施主要是利用媒体查询对元素 ...
- spirng底层实现原理
什么是框架?框架解决的是什么问题? 编程有一个准则,Don't Repeat Yourself(不要重复你的代码),所以我们会将重复的代码抽取出来,封装到方法中:如果封装的方法过多,将将这些方法封装成 ...
- 一天搞懂深度学习-训练深度神经网络(DNN)的要点
前言 这是<一天搞懂深度学习>的第二部分 一.选择合适的损失函数 典型的损失函数有平方误差损失函数和交叉熵损失函数. 交叉熵损失函数: 选择不同的损失函数会有不同的训练效果 二.mini- ...
- adSage :2013年教育行业搜索引擎投放分析报告