通过前面多篇文章,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. 杭电ACM 1004题

    原题大概意思就是统计输入字符串中,重复的最大个数! import java.util.Scanner; public class Main { public static void main(Stri ...

  2. MATLAB三点确定圆

    function [circleCenter,radius] = ThreePointCircle(obj,x,y,z) A=[x(1)-y(1),x(2)-y(2);z(1)-y(1),z(2)-y ...

  3. CRM客户关系管理系统(十)

    第十章.kingadmin+admin+actions功能开发 10.1. django admin的action  可以自己写个函数执行批量操作 crm/admin.py 后台admin actio ...

  4. ios项目开发汇总

    UI界面 iOS和Android 界面设计尺寸规范  http://www.alibuybuy.com/posts/85486.html iPhone app界面设计尺寸规范  http://www. ...

  5. 02_Linux学习_命令

    帮助命令:        xxx --help        man xxx 列出当前目录下的目录和文件:        ls        ls -l        ls --help        ...

  6. layerX参数构建

    var defaults = { name: 'layerX', url: [ { name: 'sub', url: '', focus: true } ], parent: { name: '', ...

  7. ansible常见模块

    模块的使用 查看模块帮助 ansible-doc -l 查看所有模块 ansible-doc -s MODULE_NAME 查看指定模块的详细帮助 ansible命令应用基础 语法: ansible ...

  8. Linux服务器安全审计工具与流程完全指南

    http://Linux.chinaitlab.com/server/860516.html 当今许多linux服务器都不是刚刚部署完毕的新机器,有专业的Linux系统管理员进行定期维护,IT技术人员 ...

  9. linux下安装apc

    wget htdtp://pecl.php.net/get/APC tar zxvf APC-3.1.3p.tgz cd APC-3.1.3p /usr/local/php/bin/phpize ./ ...

  10. PyQt5实现界面跳转

    网上关于PyQt5的教程很少,特别是界面跳转这一块儿,自己研究了半天,下来和大家分享一下 一.首先是主界面 1 # -*- coding: utf-8 -*- # Form implementatio ...