当前位置:网站首页>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
边栏推荐
- GOLand idea intellij 无法输入汉字
- Speaking of a software entrepreneurship project, is there anyone willing to invest?
- 南京商品房买卖启用电子合同,君子签助力房屋交易在线网签备案
- Calling the creation engine interface of Huawei game multimedia service returns error code 1002, error message: the params is error
- Redis summary
- 调用华为游戏多媒体服务的创建引擎接口返回错误码1002,错误信息:the params is error
- Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot
- [machine learning] watermelon book data set_ data sharing
- Three series of BOM elements
- leetcode134. gas station
猜你喜欢
Greenplum6.x常用语句
oracle一次性说清楚,多种分隔符的一个字段拆分多行,再多行多列多种分隔符拆多行,最终处理超亿亿。。亿级别数据量
Greenplum6.x重新初始化
About using CDN based on Kangle and EP panel
Input and output of floating point data (C language)
Routing information protocol rip
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
登山小分队(dfs)
Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot
Mountaineering team (DFS)
随机推荐
[kuangbin] topic 15 digit DP
Greenplum6.x常用语句
Golang compilation constraint / conditional compilation (/ / +build < tags>)
Greenplum6.x搭建_环境配置
Greenplum6.x搭建_安装
NCS Chengdu New Electric interview Experience
Greenplum6.x-版本变化记录-常用手册
GOLand idea intellij 无法输入汉字
POJ - 3616 Milking Time(DP+LIS)
leetcode135. Distribute candy
指针进阶,字符串函数
Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
Opencv converts 16 bit image data to 8 bits and 8 to 16
Other 7 features of TCP [sliding window mechanism ▲]
Database storage - table partition
求有符号数的原码、反码和补码【C语言】
[南京大学]-[软件分析]课程学习笔记(一)-introduction
Tronapi wave field interface - source code without encryption - can be opened twice - interface document attached - package based on thinkphp5 - detailed guidance of the author - July 6, 2022 - Novice
测试踩坑 - 当已有接口(或数据库表中)新增字段时,都需要注意哪些测试点?
Required String parameter ‘XXX‘ is not present