使用0mq的uber极简消息总线

zebu的Python项目详细描述


ZEBU /ˈzeɪbuː/ - Bos primigenius indicus or Bos indicus or Bos taurus indicus sometimes known as indicine cattle or humped cattle, is a species or subspecies of domestic cattle originating in South Asia. Zebu are characterised by a fatty hump on their shoulders, a large dewlap, and sometimes drooping ears. They are well adapted to withstanding high temperatures, and are farmed throughout the tropical countries, both as pure zebu and as hybrids with taurine cattle, the other main type of domestic cattle. Zebu are used as draught oxen, dairy cattle, and beef cattle, as well as for byproducts such as hides and dung for fuel and manure. In 1999, researchers at Texas A&M University successfully cloned a zebu. https://en.wikipedia.org/wiki/Zebu

因为我是法国人,而Zebu依靠的是0毫克,所以我想这辆巴士的名字叫Zebus可能很酷。 当然,我忍不住想用牛来命名这个模块。

ZE服务

Zebu是一个超级极简总线,我实现它是为了好玩,结果证明是有用的(至少对我来说)。

要运行zebu,需要设置2个环境变量。 zebu_publish是发布服务器连接到的端点。 zebu_订阅订阅服务器连接到的终结点。

终结点的格式为transport://address,其中的传输很可能是ipc或tcp。

$zebu戋publish=ipc://publish zebu subscribe=ipc://subscribe python-m zebu

ZE模块

Zebu也是一个模块,您可以导入该模块以使用精心编制的帮助程序定义…

订户

>>> from zebu import subscribe
>>> messages = subscribes('a/topic', 'another/topic')
>>> for message in messages:
...     # do something with message

出版商

>>> from zebu import publisher
>>> publish = publisher()
>>> publish('a/topic', 'a message on that topic')

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java有没有一种方法可以使用DesiredCapabilities在SeleniumWebDriver中获得非远程浏览器?   java逻辑和算术移位的输出   java如何以编程方式在Selenium中打开Safari>preferences?   java应用程序可以在javaws中更改自己的名称吗?   Java 7下的linux JAXB问题它说找不到RI 2.1.0   java解析来自Domino代理的JSON   java如何引用在不同类的main方法中声明的对象属性   java如何扩展apache FTPFile的功能?   java如何优化G1的暂停时间   java使用单个“更新”按钮将测试表的自动增量值插入分数表   针对UTF的regex Java电子邮件验证   java字节流问题   java 安卓将arraylist转换为自定义格式的一个字符串   java SQL语句到JTable   Java:带selfcontain计数器的while循环