README.md in asynk-0.0.1 vs README.md in asynk-0.0.2
- old
+ new
@@ -123,11 +123,11 @@
* `respond_back_execution_time` used for profiling time used for processing sync response (`default` true)
* `ignored_consumers` this parameter used for disabling unused consumers as array of strings with consumer class names(`default` [])
# Testing your consumers
-Firstly you should include `Asynk::TestHelper` to your test class, and then call `sync_publish` method for sending request, if this is rpc call,
+Firstly you should include `Asynk::TestHelper` to your test class, and then call `sync_publish` method for sending request, if this is rpc call,
invoke the asynk_response method for getting response.
Example using with Rails and MiniTest.
```ruby
# test_helper.rb
@@ -150,11 +150,33 @@
assert asynk_response.success? # testing for status of the response
assert asynk_response[:unread_messages] # testing the returned data
assert asynk_response[:unread_message_count]
end
```
+## Disabling consumers
+If you have application that have multiple different consumers, you can disable some of them by setting ignored_consumers parameter.
+For example, if you have application that implement media file processing consumers - TranscodeVideoConsumer, ResizeImageConsumer, CutAudioConsumer and you want one server only to transcode video files.
+
+You have to set ignored_consumers parameter before connecting to server
+
+```ruby
+Asynk.config[:ignored_consumers] = ['ResizeImageConsumer', 'CutAudioConsumer']
+```
+
+Also you can set ignored consumers in string environment variable
+
+```bash
+export IGNORED_CONSUMERS=ResizeImageConsumer,CutAudioConsumer
+```
+
+and then in Asynk initializer
+
+```ruby
+Asynk.config[:ignored_consumers] = ENV['IGNORED_CONSUMERS'].delete(' ').split(',') if ENV['IGNORED_CONSUMERS']
+```
+
## Known problems
* Poor documentation (source are poorly documented)
* Poor test coverage (there are almost no test)
* RPC calls implementation. Currently is implemented as continues loop, which tries get data from reply queue. Before it was implemented using Mutex, which caused huge time usage on handling them. I am not sure that current implementation is correct, but is id much faster in current tests. (On my machine 1-2 ms vs 7-8 ms).
@@ -163,6 +185,6 @@
1. Fork it ( https://github.com/[my-github-username]/gm_server/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
-5. Create a new Pull Request
\ No newline at end of file
+5. Create a new Pull Request