README.md in propono-2.1.0 vs README.md in propono-2.2.0
- old
+ new
@@ -21,11 +21,11 @@
# - "I just received The Best Message Ever"
```
## Changes from v1 to v2
-Version 2 of Propono changed a few things:
+Version 2 of Propono changed a few things:
- We moved from a global interface to a client interface. Rather than calling `publish` and equivalent on `Propono`, you should now initialize a `Propono::Client` and then call everything on that client. This fixes issues with thread safety and global config.
- We have also removed the dependancy on Fog and instead switch to the `sns` and `sqs` mini-gems of `aws-sdk`.
- UDP and TCP support have been removed, and `subscribe_by_post` has been removed.
- We are now using long-polling. This makes Propono **significantly** faster (10-100x).
@@ -97,23 +97,33 @@
config.application_name = "A name unique in your network"
config.logger = "A logger such as Log4r or Rails.logger"
config.max_retries = "The number of retries if a message raises an exception before being placed on the failed queue"
config.num_messages_per_poll = "The number of messages retrieved per poll to SQS"
+
+ config.slow_queue_enabled = true
end
```
### Options
+#### Async
+
+By default messages are posted inline, blocking the main thread. The `async: true` option can be sent when posting a message, which will spawn a new thread for the message networking calls, and unblocking the main thread.
+
#### Visiblity Timeout
For certain tasks (e.g. video processing), being able to hold messages for longer is important. To achieve this, the [visibility timeout of a message](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) can be changed on the call to listen. e.g.
```
client.listen('long-running-tasks', visiblity_timeout: 3600) do |message|
puts "I just received: #{message}"
end
```
+
+### Slow Queue
+
+The slow queue can be disabled by setting `slow_queue_enabled` to `false`. This will yield performance improvements if you do not make use of the "slow queue" functionality.
These can all also be set using the `client.config.access_key = "..."` syntax.
### Is it any good?