zoukankan      html  css  js  c++  java
  • RabbitMQ知识点整理8-queueBind方法详解

    将队列和交换器绑定的方法如下,可以与前两节中的方法定义(exchangeDeclare和queueDeclare)进行类比。

    1.Queue.BindOk queueBind(String queue, String exchange, String routingKey) throws IOException;
    2.Queue.BindOk queueBind(String queue, String exchange, String routingKey, Map<String, Object> arguments) throws IOException;
    3.void queueBindNoWait(String queue, String exchange, String routingKey, Map<String, Object> arguments) throws IOException;

    方法中涉及的参数详解。

    queue: 队列名称

    exchange: 交换器的名称

    routingKey: 用来绑定队列和交换器的路由键;

    argument: 定义绑定的一些参数。

    不仅可以将队列和交换器绑定起来,也可以将已经被绑定的队列和交换器进行解绑。具体方法可以参考如下(具体的参数解释可以参考前面的内容,这里不再赘述):

    1.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey) throws IOException;
    2.Queue.UnbindOk queueUnbind(String queue, String exchange, String routingKey, Map<String, Object> arguments) throws IOException;
  • 相关阅读:
    剔除list中相同的结构体数据
    API Gateway微服务
    Webpack vs Gulp
    客服系统
    利用 istio 来对运行在 Kubernetes 上的微服务进行管理
    微服务环境搭建
    简易的开发框架(微服务) Asp.Net Core 2.0
    Istio官方文档中文版
    Hangfire Net Core2
    IIS7性能优化
  • 原文地址:https://www.cnblogs.com/no-celery/p/13803517.html
Copyright © 2011-2022 走看看