README.md in moleculer-0.2.0 vs README.md in moleculer-0.3.0

- old
+ new

@@ -18,11 +18,11 @@ ``` or add to your Gemfile: ```ruby -gem "moleculer-ruby", "~>0.1" +gem "moleculer-ruby", "~>0.3" ``` ### Create a Simple Service ```ruby @@ -53,21 +53,40 @@ Moleculer.configure do |c| c.log_level = :debug end ``` +Some Moleculer configuration values can also be set through environment variables. + ### Configuration Options -#### logger (default: Ougai::Logger) -Sets teh Moleculer logger, this must be a Ruby `Logger` or `Ougai` compatible logger. +#### rescue_from +Sets an error handler that ties into the infrastructure of Moleculer instructing it how to handle errors of the specified +class. This allows things like Airbrake to easily tie in to exception handling. By default Moleculer rescues from +`StandardError` and simply logs it out. +#### log_file (default: STDOUT) +Sets the moleculer log_file. This value can also be set by setting the `MOLECULER_LOG_FILE` environment variable. + +#### logger +Sets the moleculer logger. The logger must be an instance of `Moleculer::Support::LogProxy`. The log proxy supports any +ruby logger that supports the ruby `Logger` interface. + +Example: +``` +c.logger = Moleculer::Support::Logger.new(Rails.logger) +``` + +In the case that the logger is set to something other than the default, the log level set for moleculer is ignored, and the +level of the passed logger is used. + #### log_level (default: debug) Sets the log level of the node. defaults to `:debug`. Can be one of `:trace`, `:debug`, `:info`, `:warn`, `:error`, -`:fatal`. +`:fatal`. This value can also be set by setting the `MOLECULER_LOG_LEVEL` environment variable. #### heartbeat_interval (default: 5) -The interval in which to send heartbeats. +The interval in which to send heartbeats. This value can also be set by setting the `MOLECULER_HEARTBEAT` environment variable. #### node_id (default: \<hostname\>-\<pid\>) The node id. Node IDs are required to be unique. In Moleculer-ruby all node ids are suffixed with the PID of the running process, allowing multiple copies of the same node to be run on the same machine. When using a containerized environment (i.e. Docker), it is suggested that the node_id also include a random set of characters as there is a chance @@ -80,14 +99,15 @@ The service prefix. This will be prefixed to all services. For example if `service_prefix` were to be `foo` then a service whose `service_name` is set to `users` would get the full `service_name` of `foo.users`. #### timeout (default: 5) The Moleculer system timeout. This is used to determine how long a moleculer `call` will wait for a response until it -times out and throws an error. +times out and throws an error. This value can also be set by setting the `MOLECULER_TIMEOUT` environment variable. #### transporter (default: redis://localhost) The transporter Moleculer should use. For more information on transporters see [Transporters](https://moleculer.services/docs/0.13/networking.html#Transporters) +This value can also be set by setting the `MOLECULER_TRANSPORTER` environment variable. ## Roadmap ### 0.1 (COMPLETE) @@ -96,13 +116,24 @@ * Redis transporter * Round robin load balancing * Service registry & dynamic service discovery * JSON serializer -### 0.2 (IN PROGRESS) +### 0.2 (COMPLETE) * Fake transporter (for testing) * Error handling, (ability to use Airbrake, etc.) -* Event grouping -### 0.3 (PENDING) -* NATS transporter -* Built in caching solution (Redis, Memory) +### 0.3 (COMPLETE) +* Service versioning +* Environment variable based configuration + +### 0.4 (IN PROGRESS) +* Protobuf serializer +* Add MessagePack serializer +* Circuit Breaker support +* Retry support + +### 0.5 (PLANNED) +* Bulkhead support +* Fallback support +* Nested call support +