Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjmurphy committed Feb 16, 2015
1 parent 737276c commit 11099d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm install sqs-consumer

var Consumer = require('sqs-consumer');

var app = new Consumer({
var app = Consumer.create({
queueUrl: 'https://sqs.eu-west-1.amazonaws.com/account-id/queue-name',
region: 'eu-west-1',
handleMessage: function (message, done) {
Expand All @@ -39,7 +39,7 @@ app.start();

## API

### `new Consumer(options)`
### `Consumer.create(options)`

Creates a new SQS consumer.

Expand Down Expand Up @@ -67,4 +67,4 @@ Each consumer is an [`EventEmitter`](http://nodejs.org/api/events.html) and emit
|-----|------|-----------|
|`error`|`err`|Fired when an error occurs interacting with the queue or processing the message.|
|`message_received`|`message`|Fired when a message is received.|
|`message_processed`|`message`|Fired when a message is successfully processed and removed from the queue.|
|`message_processed`|`message`|Fired when a message is successfully processed and removed from the queue.|
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ util.inherits(Consumer, EventEmitter);
/**
* Construct a new Consumer
*/
Consumer.create = function(options) {
return new Consumer(options);
Consumer.create = function (options) {
return new Consumer(options);
};

/**
Expand Down

0 comments on commit 11099d3

Please sign in to comment.