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

网站设计哪家比较好推广普通话的法律依据主要有

网站设计哪家比较好,推广普通话的法律依据主要有,郑州东区做网站的公司,wordpress获取当前分类别名Topic消费模型 * 通配符模型 * 生产者必须指定完整且准确的路由key * 消费者可以使用通配符 * *#xff1a;可以替代一级的任意字符 add.* add.user add.goods * ##xff1a;可以替代多级的任意字符 add.# 可以替代一级的任意字符 add.* add.user add.goods * #可以替代多级的任意字符 add.# add.user.name add.user.name.firstName生产者 package com.example.demo02.mq.topic;import com.example.demo02.mq.util.ConnectionUtils; import com.rabbitmq.client.BuiltinExchangeType; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection;import java.io.IOException;/*** author Allen* 4/11/2024 10:15 AM* version 1.0* description: 通配符模型发送者* 通配符模型* 生产者必须指定完整且准确的路由key* 消费者可以使用通配符* *可以替代一级的任意字符 add.* add.user add.goods* #可以替代多级的任意字符 add.# add.user.name add.user.name.firstName*/ public class TopicSender {public static void main(String[] args) throws Exception {// 1获取连接Connection connection ConnectionUtils.getConnection();// 2创建通道Channel channel connection.createChannel();// 3声明交换机channel.exchangeDeclare(topic.exchange, BuiltinExchangeType.TOPIC,false);// 4发送消息 路由Key写法 goods.add 不要使用通配符String msg1 商品新增了Topic模型routing key 为 goods.add;String msg2 商品修改了Topic模型routing key 为 goods.update;String msg3 商品删除了Topic模型routing key 为 goods.delete;String msg4 用户新增了Topic模型routing key 为 user.add;String msg5 用户修改了Topic模型routing key 为 user.update;String msg6 用户删除了Topic模型routing key 为 user.delete;String msg7 添加了用户名字Topic模型routing key 为 user.add.name;String msg8 添加了用户年龄Topic模型routing key 为 user.add.age;String msg9 修改了用户名字Topic模型routing key 为 user.update.name;String msg10 修改了用户年龄Topic模型routing key 为 user.update.age;channel.basicPublish(topic.exchange,goods.add,null,msg1.getBytes());channel.basicPublish(topic.exchange,goods.update,null,msg2.getBytes());channel.basicPublish(topic.exchange,goods.delete,null,msg3.getBytes());channel.basicPublish(topic.exchange,user.add,null,msg4.getBytes());channel.basicPublish(topic.exchange,user.update,null,msg5.getBytes());channel.basicPublish(topic.exchange,user.delete,null,msg6.getBytes());channel.basicPublish(topic.exchange,user.add.name,null,msg7.getBytes());channel.basicPublish(topic.exchange,user.add.age,null,msg8.getBytes());channel.basicPublish(topic.exchange,user.update.name,null,msg9.getBytes());channel.basicPublish(topic.exchange,user.update.age,null,msg10.getBytes());// 5关闭连接channel.close();connection.close();} }消费者1 package com.example.demo02.mq.topic;import com.example.demo02.mq.util.ConnectionUtils; import com.rabbitmq.client.*;import java.io.IOException;/*** author Allen* 4/11/2024 10:22 AM* version 1.0** description: 通配符模型接收者1*/ public class TopicReceiver1 {public static void main(String[] args) throws Exception {// 1获取连接Connection connection ConnectionUtils.getConnection();// 2创建通道Channel channel connection.createChannel();// 3声明交换机channel.exchangeDeclare(topic.exchange, BuiltinExchangeType.TOPIC,false);// 4声明队列channel.queueDeclare(topic.queue1, false, false, false, null);// 5绑定队列到交换机 使用通配符* 一级任意字符 # 多级任意字符channel.queueBind(topic.queue1, topic.exchange, goods.*);// 6消费消息Consumer consumer new DefaultConsumer(channel){Overridepublic void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException {System.out.println(商品模块接收到的消息是 new String(body));channel.basicAck(envelope.getDeliveryTag(),false);}};channel.basicConsume(topic.queue1,false,consumer);} }消费者2 package com.example.demo02.mq.topic;import com.example.demo02.mq.util.ConnectionUtils; import com.rabbitmq.client.*;import java.io.IOException;/*** author Allen* 4/11/2024 10:22 AM* version 1.0** description: 通配符模型接收者2*/ public class TopicReceiver2 {public static void main(String[] args) throws Exception {// 1获取连接Connection connection ConnectionUtils.getConnection();// 2创建通道Channel channel connection.createChannel();// 3声明交换机channel.exchangeDeclare(topic.exchange, BuiltinExchangeType.TOPIC,false);// 4声明队列channel.queueDeclare(topic.queue2, false, false, false, null);// 5绑定队列到交换机 使用通配符 user.* user.#channel.queueBind(topic.queue2, topic.exchange, user.#);// 6消费消息Consumer consumer new DefaultConsumer(channel){Overridepublic void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException {System.out.println(用户模块接收到的消息是 new String(body));channel.basicAck(envelope.getDeliveryTag(),false);}};channel.basicConsume(topic.queue2,false,consumer);} }结果
http://www.zqtcl.cn/news/164031/

相关文章:

  • 网站容易被百度收录个人建购物网站怎么备案
  • 中文网站什么意思wordpress电脑访问不了
  • 杨家坪网站建设企业生产erp软件公司
  • 网站模块设计软件河北seo优化_网络建设营销_网站推广服务 - 河北邢台seo
  • 陕西正天建设有限公司网站西安专业网页制作
  • 网站建设工作室介绍范文seo网站排名的软件
  • 上海网站建设-网建知识可编辑个人简历模板
  • 北京新鸿儒做的网站shopify做国内网站
  • 网站怎样做百度推广机关门户网站建设要求
  • 好看的网站后台模板沧州网站群
  • 深圳做网站排名公司哪家好哪些网站seo做的好
  • 国内网站建设推荐网站建设合同标准版
  • 哈尔滨网站制作费用企业成品网站模板
  • 网络广告网站怎么做北京海淀建设中路哪打疫苗
  • 房地产公司网站制作电影发布网站模板
  • 如何利用开源代码做网站网站本科
  • 公司是做小程序还是做网站宜宾住房与城乡建设部网站
  • 做网站哪个公司最社区问答网站开发
  • 网站引量方法网站建设推广页
  • 书店网站的建设网络营销方法有哪些
  • 深圳网站优化软件顺企网怎么样
  • 做网站的需要什么要求中国五百强企业排名表
  • 网络营销 企业网站外贸响应式网站建设
  • 网站网页制作公司o2o平台是什么意思啊
  • 惠州市网站建设个人网站怎么进入后台维护
  • 微信网站链接怎么做wordpress 绑定手机版
  • 网站建设的内容是什么在线阅读小说网站怎么建设
  • 福州网站开发哪家比较好建设网站需要掌握什么编程语言
  • 邹平做网站的公司莱芜人才网莱芜招聘
  • 旅行网站开发意义怎样优化网络速度