1. Simple模式

    做simple简单模式之前首先我们新建一个并且给他分配一个用户名,用来隔离数据,根据自己需要自行创建

    第一步

    Simple模式 - 图1

    第二步

    第三步

    第四步

    Simple模式 - 图2

    第五步

    目录结构

    Simple模式 - 图3

    kuteng-RabbitMQ

    —rabitmq.go //这个是RabbitMQ的封装

    -SimlpePublish

    —mainSimlpePublish.go //Publish 先启动

    -SimpleRecieve

    —mainSimpleRecieve.go

    rabitmq.go代码

    mainSimlpePublish.go代码