上一页 1 2 3 4 5 6 ··· 21 下一页
摘要: 背景: 项目在使用Dockerfile的volumes持久化容器内数据时,发现创建新的容器时会重新创建新的volume,并不会使用之前的volume。 查阅资料: https://segmentfault.com/q/1010000021756556?utm_source=tag-newest ht 阅读全文
posted @ 2021-05-20 16:14 Cool· 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: 直奔主题,上官方文档: flask-sqlalchemy :https://flask-sqlalchemy.palletsprojects.com/en/2.x/models/?highlight=string sqlite3 :https://sqlite.org/datatype3.html# 阅读全文
posted @ 2021-05-20 10:10 Cool· 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 消息属性 AMQP 0-9-1协议预定义了消息附带的14个属性集。除以下内容外,大多数属性很少使用: delivery_mode:将消息标记为持久性(值为2)或瞬态(任何其他值)。可能还记得第二个教程中的此属性。 content_type:对于经常使用的JSON编码,将此属性设置为applicati 阅读全文
posted @ 2021-05-06 18:27 Cool· 阅读(78) 评论(0) 推荐(0) 编辑
摘要: Headers exchange 介绍: headers exchange与 direct、topic、fanout不同,它是通过匹配 AMQP 协议消息的 header 而非路由键,有点像HTTP的Headers; headers exchange与 direct Exchange类似,性能方面比 阅读全文
posted @ 2021-04-28 16:56 Cool· 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 前言:direct模式相当于精准匹配,有精准就有模糊,对吧,接下来看看模糊匹配。 Topic exchange 区别:routing_key 必须是一系列的单词,以逗号分隔;这些单词可以是任意的,但通常它们会指定一些与信息相关的特性,最多255字节的限制。 routing_key 中两个特殊的单词: 阅读全文
posted @ 2021-04-27 17:27 Cool· 阅读(71) 评论(0) 推荐(0) 编辑
摘要: Direct exchange 在此设置中,我们可以看到绑定了两个队列的直接交换X。第一个队列由绑定键orange绑定,第二个队列有两个绑定,一个绑定键为black,另一个绑定为green。 在这样的设置中,使用路由键orange发布到交换机的消息 将被路由到队列Q1。路由键为black 或gree 阅读全文
posted @ 2021-04-23 18:13 Cool· 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Putting it all together send.py #!/usr/bin/env python import pika import sys connection = pika.BlockingConnection( pika.ConnectionParameters(host='loc 阅读全文
posted @ 2021-04-22 19:18 Cool· 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 简单模式 The Python code based on pika==1.0.0 version producer: channel.basic_publish( exchange = ``, routing_key = 'hello', body = “世界你好!” ) - 这种交换是特殊的‒它 阅读全文
posted @ 2021-04-21 14:13 Cool· 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 介绍: 1.RabbitMQ是消息代理(Message Broker) 什么是代理? - 拿立讯项目的agent举例,代理负责接收和转发消息,这就是代理,那rabbitmq也是这样,它接收并转发消息。 2.术语 p -- 写信的人 hello -- 邮箱 c -- 读信的人 设备 代理 立讯系统 3 阅读全文
posted @ 2021-04-20 12:11 Cool· 阅读(106) 评论(0) 推荐(0) 编辑
摘要: docker stop 容器时 不能将我指定的容器停掉: 1. 优雅的关闭容器:docker stop 容器id/容器名字 强制关闭容器:docker kill 容器id/容器名字 2. 绝招 docker rm -f xxx 3. 使用 docker-compose 重新启动 - service 阅读全文
posted @ 2021-04-16 17:25 Cool· 阅读(658) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 21 下一页