当前位置:网站首页>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
边栏推荐
- selenium自动化集成,八年测试经验软测工程师,一篇文章带你学懂
- National standard gb28181 protocol video platform easygbs adds streaming timeout configuration
- You should use Google related products with caution
- Download and install orcale database11.2.0.4
- 使用AGC重签名服务前后渠道号信息异常分析
- Greenplum 6.x reinitialization
- Other 7 features of TCP [sliding window mechanism ▲]
- opencv之图像分割
- Greenplum6.x-版本变化记录-常用手册
- Greenplum6.x搭建_环境配置
猜你喜欢
Greenplum6.x-版本变化记录-常用手册
leetcode134. gas station
Data type - floating point (C language)
opencv之图像分割
A bug using module project in idea
[Yu Yue education] higher vocational English reference materials of Nanjing Polytechnic University
Routing information protocol rip
Golang compilation constraint / conditional compilation (/ / +build < tags>)
Greenplum 6.x version change record common manual
Greenplum 6.x monitoring software setup
随机推荐
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
POJ - 3616 Milking Time(DP+LIS)
Uniapp wechat applet monitoring network
如何在HarmonyOS应用中集成App Linking服务
Leetcode 1984. Minimum difference in student scores
selenium自动化集成,八年测试经验软测工程师,一篇文章带你学懂
数字三角形模型 AcWing 1027. 方格取数
Mock.js用法详解
Tips for using jeditabletable
Merge sort and non comparison sort
Input of mathematical formula of obsidan
Opencv converts 16 bit image data to 8 bits and 8 to 16
Required String parameter ‘XXX‘ is not present
21 general principles of wiring in circuit board design_ Provided by Chengdu circuit board design
Exercise arrangement 2.10, 11
[Chongqing Guangdong education] organic electronics (Bilingual) reference materials of Nanjing University of Posts and Telecommunications
测试踩坑 - 当已有接口(或数据库表中)新增字段时,都需要注意哪些测试点?
Frequently Asked Coding Problems
如何在图片的目标中添加目标的mask
GOLand idea intellij 无法输入汉字