Centralised configuration loader and validator for phoenix_micro.
Configuration lives in config/*.exs:
config :phoenix_micro,
transport: :rabbitmq,
transports: [
rabbitmq: [url: "amqp://localhost"],
kafka: [brokers: [{"localhost", 9092}], group_id: "my_app"],
nats: [host: "localhost", port: 4222],
memory: []
],
default_timeout: 5_000,
default_retry: [max_attempts: 3, base_delay: 500],
serializer: PhoenixMicro.Serializer.JSON,
telemetry_enabled: trueRuntime config via {:system, "ENV_VAR"} tuples is also supported.
Summary
Functions
Returns the active (default) transport module atom.
Returns the fully-validated application configuration.
Raises NimbleOptions.ValidationError on bad config.
Returns a single top-level config key with an optional default.
Returns the retry options, merging consumer-level overrides with defaults.
Returns the config for a specific transport.
Maps a transport atom name to its implementation module.
Functions
@spec active_transport() :: atom()
Returns the active (default) transport module atom.
Returns the fully-validated application configuration.
Raises NimbleOptions.ValidationError on bad config.
Returns a single top-level config key with an optional default.
Returns the retry options, merging consumer-level overrides with defaults.
Returns the config for a specific transport.
Maps a transport atom name to its implementation module.