通过前面多篇文章,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的增删的更多相关文章

  1. go语言nsq源码解读六 tcp.go、tcp_server.go

    本篇讲nsqlookupd中tcp.go.tcp_server.go tcp_server.go位于util目录下. 12345678910111213141516171819202122232425 ...

  2. go语言nsq源码解读八 http.go、http_server.go

    这篇讲另两个文件http.go.http_server.go,这两个文件和第六讲go语言nsq源码解读六 tcp.go.tcp_server.go里的两个文件是相对应的.那两个文件用于处理tcp请求, ...

  3. (转)go语言nsq源码解读二 nsqlookupd、nsqd与nsqadmin

    转自:http://www.baiyuxiong.com/?p=886 ---------------------------------------------------------------- ...

  4. go语言 nsq源码解读三 nsqlookupd源码nsqlookupd.go

    从本节开始,将逐步阅读nsq各模块的代码. 读一份代码,我的思路一般是: 1.了解用法,知道了怎么使用,对理解代码有宏观上有很大帮助. 2.了解各大模块的功能特点,同时再想想,如果让自己来实现这些模块 ...

  5. go语言nsq源码解读七 lookup_protocol_v1.go

    本篇将解读nsqlookup处理tcp请求的核心代码文件lookup_protocol_v1.go. 1234567891011121314151617181920212223242526272829 ...

  6. go语言nsq源码解读二 nsqlookupd、nsqd与nsqadmin

    nsqlookupd: 官方文档解释见:http://bitly.github.io/nsq/components/nsqlookupd.html 用官方话来讲是:nsqlookupd管理拓扑信息,客 ...

  7. go语言nsq源码解读一-基本介绍

    简单介绍一下nsq. 参考 http://feilong.me/2013/05/nsq-realtime-message-processing-system 的介绍:NSQ是由知名短链接服务商bitl ...

  8. go语言 nsq源码解读四 nsqlookupd源码options.go、context.go和wait_group_wrapper.go

    本节会解读nsqlookupd.go文件中涉及到的其中三个文件:options.go.context.go和wait_group_wrapper.go. options.go 123456789101 ...

  9. go语言nsq源码解读五 nsqlookupd源码registration_db.go

    本篇将讲解registration_db.go文件. 1234567891011121314151617181920212223242526272829303132333435363738394041 ...

随机推荐

  1. linux 常见命令及说明杂记

    systemctl 命令: systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体.示例:systemctl is-enabled iptables.se ...

  2. PyCharm导入pymysql包运行报错问题解决:No module named 'PyMySQL'

    import pymysql # 导入包 # 报错问题显示: ImportError: No module named 'PyMySQL' 出现该问题提示:找不到该包名. 解决办法如下: ①先下载Py ...

  3. 1-bit and 2-bit Characters

    We have two special characters. The first character can be represented by one bit 0. The second char ...

  4. 在SQL Server 2008 Management Studio中修改表字段顺序

    有时我们可能需要为一个已存在的数据库表添加字段,并且想让这个字段默认排的靠前一些,这时就需要为表字段重新进行排序,默认情况下在Management Studio中调整顺序并保存时会提示"不允 ...

  5. AngularJs 学习笔记(一)作用域

    AngularJs采用了注重时效的MVC方式,是基于MVW模式. 1.$scope和作用域的概念. AngularJs中的$scope对象是模板的域模型,也称作作用域实例,通过为其属性赋值,可以传递给 ...

  6. DELETE_FAILED_INTERNAL_ERROR Error while Installing APK

    真是Android2.3的特殊版本问题,问题原因是android2.3的instant run的测试版安装方式有所特别,解决办法有2: 1.手动adb install 安装包 2.把Instant r ...

  7. MFC学习问题总结

    1.学习MFC添加位图,无法获取其ID 1).点击视图->其他窗口->资源视图,你会发现“无法在此窗口显示”,找到resource.h文件,关闭即可重新走一遍上面的过程就会发现可以打开了. ...

  8. R贡献文件中文

    贡献文件 注意: 贡献文件的CRAN区域被冻结,不再被主动维护. 英文 --- 其他语言 手册,教程等由R用户提供.R核心团队对内容不承担任何责任,但我们非常感谢您的努力,并鼓励大家为此列表做出贡献! ...

  9. Codeforces 623D [Amazing概率题]

    很有趣的一道题吖! 做法:贪心+迭代 Sigma(i*(pr[i]-pr[i-1])))=n-sigma(pr[i]), 所以我们贪心地是pr[i]尽可能大. 也就是让pr[i]/pr[i-1]尽可能 ...

  10. kaggle入门项目:Titanic存亡预测(四)模型拟合

    原kaggle比赛地址:https://www.kaggle.com/c/titanic 原kernel地址:A Data Science Framework: To Achieve 99% Accu ...