fedora中安装httpsqs

httpsqs基本用法

妙音 posted @ 2015年3月04日 09:14 in httpsqs , 8299 阅读
基于 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  全局错误
 
Avatar_small
CSPM for SaaS 说:
2020年12月14日 15:15

Thank you very much for keep this information.

Avatar_small
Management 说:
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.

Avatar_small
ali 说:
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

Avatar_small
ali 说:
2021年2月08日 20:54

On this page you can read my interests, write something special. 그래프사이트

Avatar_small
cardiologist andrea 说:
2021年2月28日 18:08

Your website is really cool and this is a great inspiring article. Thank you so much.

Avatar_small
Andrea Natale 说:
2021年2月28日 18:42

The post is written in very a good manner and it contains many useful information for me. \

Avatar_small
تنظيف افران بالدمام 说:
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

Avatar_small
صيانة مكيفات بجدة 说:
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

Avatar_small
صيانة مكيفات بالدمام 说:
2021年3月03日 03:48

A company specializing in the maintenance of home appliances in Riyadh and Jeddah

Avatar_small
صيانة مكيفات بالرياض 说:
2021年3月03日 03:50

A company specializing in the maintenance of home appliances in Riyadh and Jeddah

Avatar_small
صيانة ثلاجات شرق الر 说:
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

Avatar_small
صيانة غسالات ال جي 说:
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

Avatar_small
صيانة غسالات سامسونج 说:
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

Avatar_small
صيانة غسالات دايو 说:
2021年3月03日 03:58

A company specializing in the maintenance of home appliances in Riyadh and Jeddah

Avatar_small
صيانة غسالات دايو جد 说:
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

Avatar_small
صيانة غسالات سامسونج 说:
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

Avatar_small
صيانة غسالات بالرياض 说:
2021年3月03日 04:05

A company specializing in the maintenance of home appliances in Riyadh and Jeddah

Avatar_small
صيانة مكيفات بالخبر 说:
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

Avatar_small
more 说:
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.

Avatar_small
idnpoker 说:
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

Avatar_small
idnpoker91 说:
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.

Avatar_small
Web Design Company U 说:
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.

Avatar_small
tradesman quotes 说:
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.

Avatar_small
pawn scottsdale 说:
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!

Avatar_small
f88tw 说:
2021年4月07日 20:48

敬启者:个人小网站希望大家多多支持 感谢您对我们热心的支持 f88tw┃华歌尔┃I appreciate your kind assistance. f88tw粗工粗工内容 粗工粗工内容 |墓园|捡骨流程|捡骨费用|捡骨时间|禁忌|捡骨颜色|捡骨师|新竹|时间|台北|桃园|苗栗|头份|https://mypaper.m.pchome.com.tw/f88tw

Avatar_small
www.talon-hauts.com 说:
2021年4月08日 01:37

la boutique du talons hauts en ligne france

Avatar_small
keto allergy 说:
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

Avatar_small
Bong88 说:
2021年6月26日 19:03

your writing style very good

Avatar_small
gilbert realtors 说:
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

Avatar_small
regenerative thermal 说:
2021年7月01日 01:28

I am always looking for some free kinds of stuff over the internet. There are also some companies which give free samples. But after visiting your blog, I do not visit too many blogs. Thanks.

Avatar_small
메리트카지노 说:
2021年7月02日 07:12

The post is written in very a good manner and it contains many useful information for me.

Avatar_small
슬롯머신게임 说:
2021年7月05日 23:45

Thanks for sharing this amazing website

Avatar_small
온라인홀덤 说:
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.

Avatar_small
123movie 说:
2021年7月13日 02:04

Thanks for picking out the time to discuss this, I feel great about it and love studying more on this topic. It is extremely helpful for me. Thanks for such a valuable help again


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter