Broadway.get_rate_limiting

You're seeing just the function get_rate_limiting, go back to Broadway module for more information.
Link to this function

get_rate_limiting(broadway)

View Source (since 0.6.0)

Specs

get_rate_limiting(server :: atom()) ::
  {:ok, rate_limiting_info} | {:error, :rate_limiting_not_enabled}
when rate_limiting_info: %{
       interval: non_neg_integer(),
       allowed_messages: non_neg_integer()
     }

Gets the current values used for the producer rate limiting of the given pipeline.

Returns {:ok, info} if rate limiting is enabled for the given pipeline or {:error, reason} if the given pipeline doesn't have rate limiting enabled.

The returned info is a map with the following keys:

  • :interval
  • :allowed_messages

See the :rate_limiting options in the module documentation for more information.

Examples

Broadway.get_rate_limiting(broadway)
#=> {:ok, %{allowed_messages: 2000, interval: 1000}}