Skip to content

Commit

Permalink
Improved doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Buddhike de Silva committed Mar 29, 2020
1 parent 0a9732b commit 51c7c81
Showing 1 changed file with 56 additions and 5 deletions.
61 changes: 56 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Blaster is a utility to read messages from a message broker and forward them to a message handler over a local http endpoint. Handlers focus on the application logic while Blaster takes care of the complex tasks like parallel execution, throttling and retrying.

## Usage
## Example

**Step 1: Write a handler**

Expand Down Expand Up @@ -38,13 +38,64 @@ Launch the handler with blaster (this should be executed in the directory contai
blaster sqs --queue-name "test" --region "ap-southeast-2" --handler-command ./handler.js
```

## Usage

```
blaster <broker> [options]
```

### Global Options
`--handler-command`

Command to launch the handler.

`--handler-args`

Comma separated list of arguments to the handler command.

`--max-handlers`

Maximum number of concurrent handlers to execute. By default this is calculated by multiplying the number of CPUs available to the process by 256.

`--startup-delay-seconds`

Number of seconds to wait on start before delivering messages to the handler. Default setting is five seconds. Turning startup delay off by setting it to zero will notify blaster that handler's readiness endpoint should be probed instead of a static delay. Readiness endpoint must listen for HTTP GET requests at the handler URL. When handler is ready to accept message, readiness endpoint must respond with an HTTP 200.

`--handler-url`

Endpoint that handler is listening on. Default value is http://localhost:8312/

`--retry-count`

When the handler does not respond with an HTTP 200, blaster retries the delivery for the number of times indicated by this option.

`--retry-delay-seconds`

Number of seconds to wait before retrying the delivery of a message.

`--version`

Show blaster version

### Broker Options

#### SQS

`--region`

AWS region for SQS queue

`--queue-name`

Name of the queue. Blaster will resolve the queue URL using its name and the region.

## Road map
`--max-number-of-messages`

Currently blaster supports AWS SQS. Following broker support is under development.
Maximum number of messages to receive in a single poll from SQS. Default setting is 1 and the maximum value supported is 10.

- Kafka
- Rabbit MQ
`--wait-time-seconds`

Blaster uses long polling when receiving messages from SQS. Use this option to control the delay between polls. Default setting is 1.

<sub><sup>Made in Australia with ❤ <sub><sup>

0 comments on commit 51c7c81

Please sign in to comment.