当前位置:网站首页>channel. Detailed explanation of queuedeclare parameters
channel. Detailed explanation of queuedeclare parameters
2022-07-07 08:49:00 【Mikaelemmmm】
channel.QueueDeclare(name, durable, autoDelete, exclusive, noWait, args)
name: The queue name
durable: Persistent or not , The queue declaration is stored in memory by default , If rabbitmq Restart will lose , If you want to exist after restart, you need to make the queue persistent , Save to Erlang Self contained Mnesia In the database , When rabbitmq The database will be read after restart
autoDelete: Whether to automatically delete the queue after data consumption in the queue is completed , Whether the queue is automatically deleted after the last consumer disconnects , Can pass RabbitMQ Management, View the number of consumers in a queue , When consumers = 0 The queue will be deleted automatically
exclusive: Is it exclusive , It does two things , One : When the connection is closed connection.close() Whether the queue will be automatically deleted ; Two : Whether the queue is private private, If not exclusive , You can use both consumers to access the same queue , No problem , If it's exclusive , Lock the current queue , Other channels channel It's not accessible , If forced access, an exception will be reported :com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=405, reply-text=RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'queue_name' in vhost '/', class-id=50, method-id=20)
Generally equal to true It is used in the scenario that only one consumer can consume in a queue
noWait: Whether to wait for the server to return
args: Related parameters , At present, it is generally nil
边栏推荐
- Introduction to data fragmentation
- Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
- [Yu Yue education] C language programming reference of Zhongbei College of Nanjing Normal University
- [kuangbin] topic 15 digit DP
- Greenplum 6.x common statements
- JS的操作
- 路由信息协议——RIP
- Data type - integer (C language)
- 对API接口或H5接口做签名认证
- [kuangbin]专题十五 数位DP
猜你喜欢
idea里使用module项目的一个bug
Implementation of navigation bar at the bottom of applet
如何在HarmonyOS应用中集成App Linking服务
调用华为游戏多媒体服务的创建引擎接口返回错误码1002,错误信息:the params is error
Introduction to data fragmentation
南京商品房买卖启用电子合同,君子签助力房屋交易在线网签备案
Greenplum 6.x version change record common manual
Nanjing commercial housing sales enabled electronic contracts, and Junzi sign assisted in the online signing and filing of housing transactions
Input and output of floating point data (C language)
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
随机推荐
ncs成都新电面试经验
ES6_ Arrow function
如何在快应用中实现滑动操作组件
Implementation method of data platform landing
Implementation of navigation bar at the bottom of applet
redis故障处理 “Can‘t save in background: fork: Cannot allocate memory“
[南京大学]-[软件分析]课程学习笔记(一)-introduction
23 Chengdu instrument customization undertaking_ Discussion on automatic wiring method of PCB in Protel DXP
Required String parameter ‘XXX‘ is not present
求有符号数的原码、反码和补码【C语言】
Shell script for changing the current folder and the file date under the folder
【踩坑】nacos注册一直连接localhost:8848,no available server
Greenplum6.x重新初始化
Componentspace2022, assertions, protocols, bindings, and configuration files
JEditableTable的使用技巧
You should use Google related products with caution
[wechat applet: cache operation]
Mock.js用法详解
Arm GIC (IV) GIC V3 register class analysis notes.
Count sort (diagram)