httpsqs基本用法
妙音
posted @ 2015年3月04日 09:14
in httpsqs
, 9743 阅读
基于 HTTP GET/POST 协议的轻量级开源简单消息队列服务
启动/停止
- 启动
httpsqs -d -x /opt/httpsqs/data
- 停止
pkill httpsqs
- 参数
-l <ip_addr> 监听的IP地址,默认值为 0.0.0.0 -p <num> 监听的TCP端口(默认值:1218) -x <path> 数据库目录,目录不存在会自动创建(例如:/opt/httpsqs/data) -t <second> HTTP请求的超时时间(默认值:3) -s <second> 同步内存缓冲区内容到磁盘的间隔秒数(默认值:5) -c <num> 内存中缓存的最大非叶子节点数(默认值:1024) -m <size> 数据库内存缓存大小,单位:MB(默认值:100) -i <file> 保存进程PID到文件中(默认值:/tmp/httpsqs.pid) -a <auth> 访问HTTPSQS的验证密码(例如:mypass123) -d 以守护进程运行 -h 显示这个帮助
入队
- get方式
http://localhost:1218/?name=your_queue_name&opt=put&data=经过URL编码的文本消息&auth=mypass123
- post方式
http://localhost:1218/?name=your_queue_name&opt=put&auth=mypass123
- 返回
HTTPSQS_PUT_OK 入队成功 HTTPSQS_PUT_ERROR 入队失败 HTTPSQS_PUT_END 队列已满
出队
- get方式
http://localhost:1218/?charset=utf-8&name=your_queue_name&opt=get&auth=mypass123
- post方式
http://localhost:1218/?charset=gb2312&name=your_queue_name&opt=get&auth=mypass123
- 返回
HTTPSQS_GET_END 没有未读消息
获取状态
- get方式
http://localhost:1218/?name=your_queue_name&opt=status&auth=mypass123
- 返回
HTTP Simple Queue Service v1.7 ------------------------------ Queue Name: wyq 队列名 Maximum number of queues: 1000000 最大数 Put position of queue (1st lap): 18 入队位置 Get position of queue (1st lap): 18 出队位置 Number of unread queue: 0 未读数量
- get方式
http://localhost:1218/?name=your_queue_name&opt=status_json&auth=mypass123
- 返回json方式
{ "name":"wyq", "maxqueue":1000000, "putpos":18, 入队位置 "getpos":18, 出队位置 "putlap":1, 队列写入初始点 "getlap":1, 队列读取初始点 "unread":0 未读数量 }
重置
- get方式
http://localhost:1218/?name=your_queue_name&opt=reset&auth=mypass123
- 返回
HTTPSQS_RESET_OK 重置成功 HTTPSQS_RESET_ERROR 重置失败
更改参数
- 设置最大队列数
http://localhost:1218/?name=your_queue_name&opt=maxqueue&num=1000000000&auth=mypass123
- 返回
HTTPSQS_MAXQUEUE_OK 更改最大队列数成功 HTTPSQS_MAXQUEUE_CANCEL 操作被取消
- 设置刷新内存缓冲区到磁盘间隔时间
http://localhost:1218/?name=your_queue_name&opt=synctime&num=10&auth=mypass123
- 返回
HTTPSQS_SYNCTIME_CANCEL 本次操作被取消 HTTPSQS_SYNCTIME_OK 修改间隔时间成功
HTTPSQS_AUTH_FAILED 密码校验失败
HTTPSQS_ERROR 全局错误
2017年10月28日 13:27
楼主写得真好
2018年10月08日 17:21
PHP language is very hard
2020年11月03日 14:33
敬启者:个人小网站希望大家多多支持 感谢您对我们热心的支持 f88tw┃华歌尔┃I appreciate your kind assistance. f88tw|墓园|捡骨流程|捡骨费用|捡骨时间|禁忌|捡骨颜色|捡骨师|新竹|时间|台北|桃园|苗栗|头份|火化|晋塔|安葬|法事|捡骨|看日子|墓穴|墓园|坟墓|看日子|乞丐|http://mypaper.m.pchome.com.tw/f88tw
2020年12月14日 15:15
Thank you very much for keep this information.
2020年12月14日 15:23
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.
2021年1月25日 21:23
I can give you the address Here you will learn how to do it correctly. Read and write something good. น้ำยาบุหรี่ไฟฟ้าpod
2021年2月08日 20:54
On this page you can read my interests, write something special. 그래프사이트
2021年2月28日 18:08
Your website is really cool and this is a great inspiring article. Thank you so much.
2021年2月28日 18:42
The post is written in very a good manner and it contains many useful information for me. \
2021年3月03日 03:47
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月03日 03:48
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月03日 03:48
A company specializing in the maintenance of home appliances in Riyadh and Jeddah
2021年3月03日 03:50
A company specializing in the maintenance of home appliances in Riyadh and Jeddah
2021年3月03日 03:53
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月03日 03:55
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月03日 03:57
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月03日 03:58
A company specializing in the maintenance of home appliances in Riyadh and Jeddah
2021年3月03日 03:59
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月03日 04:03
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月03日 04:05
A company specializing in the maintenance of home appliances in Riyadh and Jeddah
2021年3月03日 04:06
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年3月26日 00:26
Thank you for sharing such a informative blog.if you are suffering many problems in your life.get solutions or tips and astrology predictions of your problems from best astrologers of India for free on call or chat.
2021年4月03日 06:08
The best company specializing in the maintenance of various home appliances, and we also have the best technical team at the highest level of experience and efficiency
2021年4月03日 08:01
Thanks for the blog filled with so many information. Stopping by your blog helped me to get what I was looking for. Now my task has become as easy as ABC.
2021年4月03日 21:01
I think I have never seen such blogs ever before that has complete things with all details which I want. So kindly update this ever for us.
2021年4月05日 09:14
Initial You got a awesome blog .I determination be involved in plus uniform minutes. i view you got truly very functional matters , i determination be always checking your blog blesss.
2021年4月07日 04:37
Marvelous web journal. I appreciated perusing your articles. This is really an incredible read for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!
2021年4月07日 20:48
敬启者:个人小网站希望大家多多支持 感谢您对我们热心的支持 f88tw┃华歌尔┃I appreciate your kind assistance. f88tw| 粗工| 粗工内容 | 粗工| 粗工内容 |墓园|捡骨流程|捡骨费用|捡骨时间|禁忌|捡骨颜色|捡骨师|新竹|时间|台北|桃园|苗栗|头份|https://mypaper.m.pchome.com.tw/f88tw
2021年4月08日 01:37
la boutique du talons hauts en ligne france
2021年4月10日 10:26
excited after reading your blog. Your blog is very much innovative and much helpful for any industry as well as for person
2021年6月29日 01:09
I read this article. I think You put a lot of effort to create this article. I appreciate your work
2021年7月02日 07:12
The post is written in very a good manner and it contains many useful information for me.
2021年7月05日 23:45
Thanks for sharing this amazing website
2021年7月11日 01:40
Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work.
2021年12月07日 18:50
สมัคร igoal88win Commitment to service Stable financial
2021年12月22日 13:43
Looking for answers to your CBD questions? Weed Viral is here to help you get the accurate, evidence-based information you need.
2021年12月29日 15:29
Looking for answers to your CBD questions? Weed Viral is here to help you get the accurate, evidence-based information you need.
2022年1月22日 20:57
Marvelous web journal. I appreciated perusing your articles. This is really an incredible read for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!
2022年1月27日 20:54
Jazmin offers an amazing collection of ladies bottom wear such as <a href="https://jazmin.pk/collections/bottoms">trousers designs</a>. Grab these stylish and trendy bottoms online today from Jazmin.pk. These women's bottoms are sure to bring attention and improve your wardrobe. Jazmin offers the best bottom wear in Pakistan.
2022年2月01日 20:57
Wisdom Pharma offers you all the best selfcare products in one convenient place, such as their pigmentation creams. So, buy from Wisdom Pharma and get high quality Pigmentation Creams online. Wisdom Pharma brings the best creams for Pigmentation in Pakistan.
2022年2月02日 20:00
Great post, please keep on sharing amazing article like this!
2022年5月22日 19:06
A great deal of learning here. i am going to bookmark it, if you are looking for lyca beltegoed, lebara beltegoed, lyca bundel xs, samsung a52, samsung a51, samsung a72, iphone 13 pro max in Netherlands, get in touch with us.
2022年8月09日 15:01
The next way you can make money on the Dark Web is to join one of the many web directories that allow you to bid for keywords for content. dark web links
2022年8月09日 15:37
These sites are known for having links to sites which are actually of lower quality than their own. If you link to a poor quality website, then you may actually wind up hurting your own sites ranking. deep web
2022年8月09日 18:31
Although it may sound like an embarrassing topic, this is the best source for information on any given case that you want to look into. There are several web sites that offer information from this center. dark web links
2022年8月09日 23:33
The best way though is to find a directory of articles on the internet. These directories will usually cost you nothing but there are hundreds that you could find with just a few searches. affiliate marketing success
2022年9月02日 17:52 It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait reading. I am impressed with your work and skill. Thanks. NFT Mint Calendar