jhs / cqs Goto Github PK
View Code? Open in Web Editor NEWCouchDB Queue Service: API-compatible Amazon SQS implementation with NodeJS, CouchDB
License: Apache License 2.0
CouchDB Queue Service: API-compatible Amazon SQS implementation with NodeJS, CouchDB
License: Apache License 2.0
For example, set a threshold, 100ms and batch all messages that need to be created into one _bulk_docs
update, and send that 100ms later.
Bonus points for still using the PUT
method if there is only one message, so the CouchDB logs look nice.
Is there a simple way to detect message additions or do I have to write my own changes filter and use couch dbs change notifications?
I am trying to pull multiple items from a queue, but i only ever receive one item...
my code:
cqs.ReceiveMessage('queue_name', 3, function(er, messages) {
console.log(messages);
});
always shows one item, no matter how long I leave it, or how many items are in the queue (1, 2 or 3).
Is this a bug or am I misunderstanding something?
I create a queue and all looks good. Here is the design doc source: https://gist.github.com/1211432
When sending a message I get a 500 response status from couchdb.
In introduced some debugging at the request level and found that the error was {"error":"case_clause","reason":"{[{<<\"message\">>,<<\"/^CQS\\//.test is not a function\">>}
which comes from the validate_doc_update on the design doc, line 17:
...
if(! /^CQS//.test(newDoc._id)) // A simple test, hopefully future-proof
...
BTW, I'm using cqs 0.3.0, node 0.4.10 and couchdn 1.1.0.
Thanks.
Check the CouchDB version and if ?stale=update_after
is supported (version 1.1 and later) then use that when hitting the views.
Hi,
I get the following error/stacktrace when trying to call ListQueues:
Error: Invalid protocol
at [object Object].request (/path/to/my/app/node_modules/cqs/node_modules/request/main.js:194:34)
at request (/path/to/my/app/node_modules/cqs/node_modules/request/main.js:332:5)
at Object.req_json (/path/to/my/app/node_modules/cqs/lib.js:68:10)
at Object.list_queues (/path/to/my/app/node_modules/cqs/queue.js:296:7)
at Object.default_wrapper [as ListQueues] (/path/to/my/app/node_modules/cqs/api.js:38:22)
This is after I call cqs.defaults()
with an argument like the following:
{ couch: 'http://username:password@localhost:5984', db: 'cqs-development' }
(Assume that I used my local admin account for the defaults couch string...)
Anyways, I'm excited to continue trying out CQS, and if you could help me figure this out I'd really appreciate it! So, please let me know any other details I can provide to help.
Cheers,
Zach
P.S. I'm on node.js v0.4.8 and CQS v0.3.0.
Hi again,
Now, I'm able to successfully call ListQueues and CreateQueue, but when I attempt to call SendMessage I get the following error message:
https://gist.github.com/gists/1068652
I feel like you don't wanna escape the backslash there, in /^CQS\\\\//
, but I'm not sure how this goes together.
Cheers,
Zach
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.