README.md in salesforce_streamer-2.1.1 vs README.md in salesforce_streamer-2.2.0
- old
+ new
@@ -89,10 +89,11 @@
SalesforceStreamer.configure do |config|
config.logger = Logger.new(STDERR, level: 'INFO')
config.exception_adapter = proc { |e| puts e }
config.replay_adapter = MyReplayAdapter
config.use_middleware AfterMessageReceived
+ config.use_faye_extension ErrorLoggingExtension.new
config.manage_topics = true
end
```
### Launch The Streamer
@@ -170,9 +171,20 @@
end
end
```
This adapter will be used directly by `Restforce::ReplayExtension`.
+
+### Use Faye Extension
+
+The `config.use_faye_extension` should be given an object that responds to
+`.incoming(message, callback)` or `.outgoing(message, callback)` or both. Find
+out more about extensions from
+[Faye](https://github.com/faye/faye/blob/master/spec/ruby/server/extensions_spec.rb)
+specs.
+
+Any configured extensions are added to the Faye client used by the Restforce
+client when starting up the server.
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.