DataLogger.Destination.Supervisor (data_logger v0.4.0) View Source

Supervisor of a group of DataLogger.Destination.Controller workers for given topic. For every configured destination, there will be a worker (unless prefixes are used).

For example if we configured a NoSQL destination and a relational destination, for given document/schema used as topic a new DataLogger.Destination.Supervisor will be created and it will be supervising two DataLogger.Destination.Controller workers.

If the destinations are specifying prefixes, by including the option prefix: <prefix>, the supervisor will create and supervise loggers for only these destinations, that have prefix which prefixes the topic given to start_link. If the destinations are:

destinations: [
  {MemoryDestination, %{destination: 1, prefix: :blue}},
  {MemoryDestination, %{destination: 2, prefix: :purple}}
]

And the supervisor is started with topic of "purple_1" it will only start and supervise a proces for {MemoryDestination, %{destination: 2, prefix: :purple}}.

Using destinations with prefixes we could send part of our data only to subset of the configured destinations.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.