当前位置:网站首页>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
边栏推荐
- 平台化,强链补链的一个支点
- POJ - 3616 Milking Time(DP+LIS)
- Merge sort and non comparison sort
- [kuangbin] topic 15 digit DP
- Exercise arrangement 2.10, 11
- National SMS center number inquiry
- AVL balanced binary search tree
- uniapp 微信小程序监测网络
- Input of mathematical formula of obsidan
- Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
猜你喜欢

联想混合云Lenovo xCloud:4大产品线+IT服务门户

Appeler l'interface du moteur de création du service multimédia de jeu Huawei renvoie le Code d'erreur 1002, le message d'erreur: les paramètres sont l'erreur
![[step on the pit] Nacos registration has been connected to localhost:8848, no available server](/img/ee/ab4d62745929acec2f5ba57155b3fa.png)
[step on the pit] Nacos registration has been connected to localhost:8848, no available server

let const

关于基于kangle和EP面板使用CDN

leetcode134. gas station
![[MySQL] detailed explanation of trigger content of database advanced](/img/6c/8aad649e4ba1160db3aea857ecf4a1.png)
[MySQL] detailed explanation of trigger content of database advanced

Novice entry SCM must understand those things

Category of IP address

登山小分队(dfs)
随机推荐
21 general principles of wiring in circuit board design_ Provided by Chengdu circuit board design
Why choose cloud native database
How to add a mask of a target in a picture
Input of mathematical formula of obsidan
redis故障处理 “Can‘t save in background: fork: Cannot allocate memory“
Greenplum 6.x build_ install
Mock.js用法详解
What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
Greenplum6.x监控软件搭建
[Nanjing University] - [software analysis] course learning notes (I) -introduction
Go write a program that runs within a certain period of time
Composer change domestic image
Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot
NCS Chengdu New Electric interview Experience
FPGA knowledge accumulation [6]
Required String parameter ‘XXX‘ is not present
AVL balanced binary search tree
Laravel8 uses passport login and JWT (generate token)
求有符号数的原码、反码和补码【C语言】
如何在图片的目标中添加目标的mask