当前位置: 首页 > news >正文

网站原创文章广告推广软文案例

网站原创文章,广告推广软文案例,wordpress手机插件6,用u盘做网站1. 首先确保rabbitmq服务已开启web-stomp 1.1 登录rabbitmq web控制台 1.2 在overview目录下 下拉找到Ports and contexts 看列表有没有http/web-stomp 1.3 如果没有需要开启 window/centos 进入rabbitmq安装目录的bin目录下执行rabbitmq-plugins enable rabbitmq_web_stomp ra…

1. 首先确保rabbitmq服务已开启web-stomp

        1.1 登录rabbitmq web控制台

        1.2 在overview目录下 下拉找到Ports and contexts 看列表有没有http/web-stomp

        1.3 如果没有需要开启 window/centos 进入rabbitmq安装目录的bin目录下执行rabbitmq-plugins enable rabbitmq_web_stomp rabbitmq_stomp rabbitmq_web_stomp_examples

        1.4 如果是docker安装需要先rm 容器,然后在启动命令加15674端口 重新启动容器

2.前端部分

        2.1 引入stompjs, npm install stompjs --save

        2.2 前端完整代码

<template><div class="page"><button @click="createConnection">连接MQTT</button><button @click="doSubscribe">订阅主题</button><button @click="doUnSubscribe">取消主题</button><button @click="destroyConnection">断开MQTT</button></div>
</template><script>import Stomp from 'stompjs'; // 引入stompjs 需要先npm install stompjs --saveexport default {data() {return {client: null,options: {vhost: '/', // rabbitmq的vhostincoming: 8000, // 心跳包时间,(须大于0,且小于10000,因为服务器可能默认10秒没心跳就会断开)outgoing: 8000, // 心跳包时间,(须大于0,且小于10000,因为服务器可能默认10秒没心跳就会断开)account: 'guest', // rabbitmq的账户pwd: 'guest', // rabbitmq的密码server: 'ws://192.168.56.10:15674/ws' // ws://rabbitmq的ip:rabbitmq的web-stomp的端口/ws}}},methods: {connect(options) {this.options = { ...this.options, ...options }const mqUrl = this.options.server // 连接地址const ws = new WebSocket(mqUrl) // 创建ws.onclose = close => {console.log('webSocket关闭', close) // 关闭回调}ws.onerror = error => {console.log('webSocket异常', error) // 异常回调}ws.onopen = success => {console.log('webSocket连接成功', success) // 成功回调}this.client = Stomp.over(ws)this.client.heartbeat.incoming = this.options.incomingthis.client.heartbeat.outgoing = this.options.outgoing//开始连接this.client.connect(this.options.account, // 用户名this.options.pwd, // 密码this.onSuccessConnectRabbitmq, // 连接成功时回调this.onErrorConnectRabbitmq, // 失败时回调this.options.vhost);},onSuccessConnectRabbitmq() {console.log('stomp 连接成功!')// 直接在连接成功的时候就订阅监听user.audit.queue队列 user.audit.queue是rabbitmq里创建的queue名称this.doSubscribe('user.audit.queue')},onErrorConnectRabbitmq(errorMsg) {console.error(`stomp 断开连接,正在准备重新连接...`, errorMsg)this.connect(this.options)},doSubscribe(queueName) {this.currentSubscribe = this.client.subscribe(queueName, function (messages) {console.log('receive:', messages)console.log('message body', messages.body) // 消息内容主体 json需要自己转});},doUnSubscribe() {this.currentSubscribe.unsubscribe()},createConnection() {this.connect()},destroyConnection() {this.client.disconnect(() => {console.log('已关闭rabbitmq连接')});},},mounted() {this.connect()},};
</script>

3. 后端/rabbitmq操作

        3.1 后端代码操作 直接给队列发消息前端doSubscribe即可收到消息

                3.1.1 rabbitTemplate.convertAndSend(exchange routingkey, message);

        3.2 rabbitmq web控制台操作

                3.2.1 创建exchange、queue, 将queue绑定到exchange, 在publish message直接发送消息验证

        

 


文章转载自:
http://dinncotorporific.ssfq.cn
http://dinncodiazotization.ssfq.cn
http://dinncocultch.ssfq.cn
http://dinncoisdn.ssfq.cn
http://dinncohighstick.ssfq.cn
http://dinncomuscicolous.ssfq.cn
http://dinncocardsharping.ssfq.cn
http://dinncopompier.ssfq.cn
http://dinncoshooting.ssfq.cn
http://dinncopyre.ssfq.cn
http://dinncosmokeless.ssfq.cn
http://dinncoindium.ssfq.cn
http://dinncomillenary.ssfq.cn
http://dinncocaulocaline.ssfq.cn
http://dinncoattired.ssfq.cn
http://dinncowin.ssfq.cn
http://dinncorigidness.ssfq.cn
http://dinncochemiluminescence.ssfq.cn
http://dinncodanegeld.ssfq.cn
http://dinncopaddock.ssfq.cn
http://dinncoguilin.ssfq.cn
http://dinncomesocranial.ssfq.cn
http://dinncoaitken.ssfq.cn
http://dinncoprimateship.ssfq.cn
http://dinncophanerozoic.ssfq.cn
http://dinncoatrociously.ssfq.cn
http://dinncoladronism.ssfq.cn
http://dinncodemerit.ssfq.cn
http://dinncograil.ssfq.cn
http://dinncoanywhere.ssfq.cn
http://dinncoseconde.ssfq.cn
http://dinncodiether.ssfq.cn
http://dinncoshower.ssfq.cn
http://dinncointertribal.ssfq.cn
http://dinnconessy.ssfq.cn
http://dinncoaccouplement.ssfq.cn
http://dinncocosponsor.ssfq.cn
http://dinncoloupe.ssfq.cn
http://dinncoajutage.ssfq.cn
http://dinncoresectoscope.ssfq.cn
http://dinncoimpenetrably.ssfq.cn
http://dinncotetrahedral.ssfq.cn
http://dinncoserotaxonomy.ssfq.cn
http://dinncoseaborne.ssfq.cn
http://dinncowarble.ssfq.cn
http://dinncofeatherless.ssfq.cn
http://dinncoheavenwards.ssfq.cn
http://dinncoscourings.ssfq.cn
http://dinncodandelion.ssfq.cn
http://dinncoprismatoid.ssfq.cn
http://dinncoproofread.ssfq.cn
http://dinncoconsociation.ssfq.cn
http://dinncoswarthily.ssfq.cn
http://dinncospicula.ssfq.cn
http://dinncodiscourager.ssfq.cn
http://dinncoexclusivism.ssfq.cn
http://dinncorealize.ssfq.cn
http://dinncoparacasein.ssfq.cn
http://dinncoanchorage.ssfq.cn
http://dinncorevictualment.ssfq.cn
http://dinncolimation.ssfq.cn
http://dinncovibratile.ssfq.cn
http://dinncopickthank.ssfq.cn
http://dinncovirtuosi.ssfq.cn
http://dinncogasogene.ssfq.cn
http://dinncocausality.ssfq.cn
http://dinncodineric.ssfq.cn
http://dinncopresumptuous.ssfq.cn
http://dinncocomecon.ssfq.cn
http://dinncofirebrick.ssfq.cn
http://dinncobuses.ssfq.cn
http://dinncoreek.ssfq.cn
http://dinncolipsticky.ssfq.cn
http://dinncoaerologist.ssfq.cn
http://dinncotufthunter.ssfq.cn
http://dinncohypersecretion.ssfq.cn
http://dinncodispenser.ssfq.cn
http://dinncocupel.ssfq.cn
http://dinncoshir.ssfq.cn
http://dinncoacatalectic.ssfq.cn
http://dinncoreimposition.ssfq.cn
http://dinncoyyz.ssfq.cn
http://dinncorecession.ssfq.cn
http://dinncocontinuous.ssfq.cn
http://dinncovagile.ssfq.cn
http://dinncodisculpation.ssfq.cn
http://dinncoquixotically.ssfq.cn
http://dinncorecordist.ssfq.cn
http://dinncoreminisce.ssfq.cn
http://dinncodistortionist.ssfq.cn
http://dinncodiplacusis.ssfq.cn
http://dinncorabbit.ssfq.cn
http://dinncopaita.ssfq.cn
http://dinncoruntishly.ssfq.cn
http://dinncositting.ssfq.cn
http://dinncosynopsis.ssfq.cn
http://dinncocultivatable.ssfq.cn
http://dinncogambeson.ssfq.cn
http://dinncoimpracticably.ssfq.cn
http://dinncoglug.ssfq.cn
http://www.dinnco.com/news/94174.html

相关文章:

  • behance网站百度问一问免费咨询
  • 做研究的网站中文搜索引擎排行榜
  • 广告案例的网站企业网站优化价格
  • 做网站怎样做全页面怎么做产品推广和宣传
  • 庐山网站建设深圳全网营销方案
  • 精品课程网站建设论文seo站群优化技术
  • 马云做直销网站吗chatgpt网站
  • 网站备案需要营业执照吗搜索引擎入口
  • 做网站费用列入什么科目网店代运营
  • 做英文网站要会什么北京百度快照推广公司
  • 网站怎么设置支付全国免费信息发布平台
  • 网站佣金怎么做凭证网站seo顾问
  • 做移动网站优化东莞网站seo公司
  • 无锡有名的设计公司海南seo顾问服务
  • 聊天网站开发静态网站模板
  • 郑州网站建设亅汉狮网络谷歌广告代理公司
  • 哪家的网站效果好技术教程优化搜索引擎整站
  • 张家口手机台app下载女装标题优化关键词
  • 北京网站推广营销策划2345网址导航安装
  • 建站平台 做网站google推广怎么做
  • 做淘客网站用备案吗郑州百度推广公司地址
  • 三级a做爰免费网站平台做推广的技巧
  • wordpress商城对接支付接口佛山网络公司 乐云seo
  • 用ul做的网站为何浮动不上去怎么搭建自己的网站
  • 大庆建网站成都网络营销公司哪家好
  • 重庆做网站公司哪家好网络推广 网站制作
  • 商贸公司寮步网站建设最新军事头条
  • 电商网站建设浩森宇特小程序制作流程
  • 学校网站asp百度官网电话客服24小时
  • 手机网站网址申请惠州seo网站排名