摘要: 一、安装gcc依赖 由于 redis 是用 C 语言开发,安装之前必先确认是否安装 gcc 环境(gcc -v),如果没有安装,执行以下命令进行安装 [root@localhost local]# yum install -y gcc 二、下载并解压安装包 [root@localhost local 阅读全文
posted @ 2018-07-03 14:37 努力乄小白 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 生产者:topic_publiser.py 消费者:topic_consumer.py 阅读全文
posted @ 2018-07-03 10:53 努力乄小白 阅读(414) 评论(0) 推荐(0) 编辑
摘要: direct绑定模式的,选择性接收 生产者:direct_publiser.py 消费者:direct_consumer.py 阅读全文
posted @ 2018-07-02 16:41 努力乄小白 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 生产者:fanout_publiser.py 消费者:fanout_consumer.py 阅读全文
posted @ 2018-07-02 15:26 努力乄小白 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 报错: Traceback (most recent call last): File "D:/fanout_server.py", line 12, in <module> type='fanout')TypeError: exchange_declare() got an unexpected 阅读全文
posted @ 2018-07-02 15:17 努力乄小白 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 生产者: 消费者: 阅读全文
posted @ 2018-07-01 20:07 努力乄小白 阅读(196) 评论(0) 推荐(0) 编辑
摘要: RabbitMQ需要 erlang 和pika 1.RabbitMQ和erlang版本必须匹配,否则就报没有进程错误 2.RabbitMQ的erlang.cookie和windows下的erlang.cookie必须一致 在windows安装RabbitMQ需要配置环境变量,一个是erlang环境变 阅读全文
posted @ 2018-06-29 18:31 努力乄小白 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 服务器端:gevent_server.py 客户端:socket_client.py 阅读全文
posted @ 2018-06-27 12:26 努力乄小白 阅读(267) 评论(0) 推荐(0) 编辑
摘要: import gevent def foo(): print("Running in foo") gevent.sleep(2) print("Explicit context switch to foo again") def bar(): print("Explicit context to bar") gevent.sleep(1 ) ... 阅读全文
posted @ 2018-06-26 18:30 努力乄小白 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 高并发,单线程的实现上万并发不是问题 阅读全文
posted @ 2018-06-26 18:03 努力乄小白 阅读(214) 评论(0) 推荐(0) 编辑