Eva Balycheva 48f3e9f9a2 Fix fail of claim after some message expire(Redis)
If some messages in Redis are already expired, it's impossible to claim
any new messages.

Zaqar internally catches this error from running "claim_messages.lua":
"ResponseError: Error running script: @user_script:59: user_script:59:
attempt to compare nil with number". And returns 503 response code to
the user.

This happens because if some message is expired (it's <message_id>
record was automatically deleted from database), it's ID is still listed
in set "<project_id>.<queue_name>.messages" and Zaqar uses this ID. In
this case on attempt to get some values from <message_id>'s fields, it
gets 'nil' values.

This patch makes Zaqar check if returned field values from <message_id>
record are 'nil'. If values are not 'nil', process the record normally.
If values are 'nil', remember message ID. In the end of the script
"claim_messages.lua" garbage collect all such message IDs, because it's
a good opportunity to do so.

Closes-Bug: 1548135
Change-Id: Iedd2b82f6da30dd38bfdbb837bf9d0d4c282e222
2016-06-02 09:03:28 +00:00
2014-08-04 10:36:50 +02:00
2016-02-18 20:41:07 -05:00
2014-06-04 22:31:55 +02:00
2015-11-16 00:27:43 +05:30
2014-08-04 10:36:50 +02:00
2014-09-08 13:55:13 +02:00
2015-09-19 16:37:56 +05:30
2014-03-21 10:16:28 +01:00
2016-02-18 20:41:07 -05:00
2015-09-19 05:42:08 +00:00
2016-05-31 03:48:17 +00:00

Zaqar

Zaqar is a multi-tenant cloud messaging and notification service for web and mobile developers. It combines the ideas pioneered by Amazon's SQS product with additional semantics to support event broadcasting.

The service features a fully RESTful API, which developers can use to send messages between various components of their SaaS and mobile applications, by using a variety of communication patterns. Underlying this API is an efficient messaging engine designed with scalability and security in mind.

Other OpenStack components can integrate with Zaqar to surface events to end users and to communicate with guest agents that run in the "over-cloud" layer. Cloud operators can leverage Zaqar to provide equivalents of SQS and SNS to their customers.

General information is available in wiki:

https://wiki.openstack.org/wiki/Zaqar

The API v1.1 (stable) specification and documentation are available at:

https://wiki.openstack.org/wiki/Zaqar/specs/api/v1.1

Zaqar Contributor Documentation, the source of which is in doc/source/, is available at:

http://docs.openstack.org/developer/zaqar/

Contributors are encouraged to join IRC (#openstack-zaqar channel on irc.freenode.net):

https://wiki.openstack.org/wiki/IRC

Information on how to run unit and functional tests is available at:

http://docs.openstack.org/developer/zaqar/running_tests.html

Information on how to run benchmarking tool is available at:

http://docs.openstack.org/developer/zaqar/running_benchmark.html

Using Zaqar

If you are new to Zaqar and just want to try it, you can set up Zaqar in the development environment.

Using Zaqar in production environment:

Coming soon!

Using Zaqar in development environment:

The instruction is available at:

http://docs.openstack.org/developer/zaqar/devref/development.environment.html

This will allow you to run local Zaqar server with MongoDB as database.

This way is the easiest, quickest and most suitable for beginners.

Description
OpenStack Messaging (Zaqar)
Readme 46 MiB
Languages
Python 96.1%
PHP 1.5%
Shell 1.2%
HTML 0.8%
Lua 0.3%