一般常用的类型有四种: fanout,direct,topic ,headers。 AMQP协议里还提到另外两种类型:System和自定义,这里先不说这两种,先说说常用的四种类型。 fanout: fanout会把所有发送到该交换器的消息路由到所有与该交换器绑定的队列中。 direct: direc Read More
posted @ 2019-10-17 18:58 Krystal_*^* Views(821) Comments(0) Diggs(0)
本操作是在linux系统命令下完成: 生成证书步骤: 第一步:生成ca的私钥 [root@localhost ~]# openssl genrsa -out ca.key 1024 注意: 1024 为 秘钥生成长度,可根据生成公私钥进行调整 第二步:生产ca 证书 [root@localhost  Read More
posted @ 2019-10-17 18:33 Krystal_*^* Views(4795) Comments(0) Diggs(0)
大家都知道,在使用rabbitmq时不管是消费还是生产都需要创建信道(channel) 和connection(连接),如下图producer示例。我们完全可以直接使用Connection就能完成信道的工作,为什么还要引入信道呢,试想这样一个场景,一个应用有多个线程需要从rabbitmq中消费,或是 Read More
posted @ 2019-10-17 18:21 Krystal_*^* Views(4445) Comments(0) Diggs(1)