README.md in message_bus-2.0.0.beta.5 vs README.md in message_bus-2.0.0.beta.6

- old
+ new

@@ -18,11 +18,11 @@ **Yes**, MessageBus uses Rack Hijack, this interface allows us to take control of the underlying socket. MessageBus can handle thousands of concurrent long polls on all popular Ruby webservers. MessageBus runs as middleware in your Rack (or by extension Rails) application and does not require a dedicated server. Background work is minimized to ensure it does not interfere with existing non MessageBus traffic. ## Is this used in production at scale? -**Yes**, MessageBus was extracted out of [Discourse](http://www.discourse.org/) and is used in thousands of production Discourse sites at scale. +**Yes**, MessageBus was extracted out of [Discourse](http://www.discourse.org/) and is used in thousands of production Discourse sites at scale. ## Installation Add this line to your application's Gemfile: @@ -172,11 +172,11 @@ callbackInterval|15000|Safeguard to ensure background polling does not exceed this interval (in milliseconds) backgroundCallbackInterval|60000|Interval to poll when long polling is disabled (either explicitly or due to browser being in backgroud) maxPollInterval|180000|If request to the server start failing, MessageBus will backoff, this is the upper limit of the backoff. alwaysLongPoll|false|For debugging you may want to disable the "is browser in background" check and always long-poll baseUrl|/|If message bus is mounted in a subdirectory of different domain, you may configure it to perform requests there -ajax|$.ajax|The only dependency on jQuery, you may set up a custom ajax function here +ajax|$.ajax or XMLHttpRequest|MessageBus will first attempt to use jQuery and then fallback to a plain XMLHttpRequest version that's contained in the `messsage-bus-ajax.js` file. `messsage-bus-ajax.js` must be loaded after `messsage-bus.js` for it to be used. **API**: `MessageBus.diagnostics()` : Returns a log that may be used for diagnostics on the status of message bus @@ -190,10 +190,12 @@ `MessageBus.subscribe(channel,func,lastId)` : Subscribe to a channel, optionally you may specify the id of the last message you received in the channel. `MessageBus.unsubscribe(channel,func)` : Unsubscribe callback from a particular channel +`MessageBus.noConflict()` : Removes MessageBus from the global namespace by replacing it with whatever was present before MessageBus was loaded. Returns a reference to the MessageBus object. + ## Running tests To run tests you need both Postgres and Redis installed. By default we will connect to the database `message_bus_test` with the current username. If you wish to override this: ``` @@ -286,18 +288,16 @@ after_fork do |server, worker| MessageBus.after_fork end ``` -### +### ## Want to help? If you are looking to contribute to this project here are some ideas - Add a test suite for JavaScript message-bus.js - Build backends for other providers (zeromq, rabbitmq, disque) - Improve and properly document admin dashboard (add opt-in stats, better diagnostics into queues) - Improve general documentation (Add examples, refine existing examples) - Make MessageBus a nice website - -