e_poller v0.1.1 EPoller.Config View Source

This module contains the configuration management for queue polling

Link to this section Summary

Types

The configurable parameters for the long poller

The configuration list for the long poller

Functions

Gets the user and default config for polling and merges them

Link to this section Types

Link to this type attribute_name() View Source
attribute_name() ::
  :wait_time_seconds |
  :visibility_timeout |
  :max_messages |
  :region

The configurable parameters for the long poller.

wait_time_seconds sets how long the poller will wait for a message to arrive

visibility_timeout sets how long, in seconds, a message will be hidden from subsequent requests after being taken off the queue.

max_messages sets the max number of messages that can be consumed from the poller. This number is limited to 10.

region sets the region that the queue currently exists in.

Link to this type poller_config_opts() View Source
poller_config_opts() :: [attribute_name(), ...]

The configuration list for the long poller

Link to this section Functions

Link to this function get_full_config(user_config) View Source
get_full_config(map()) :: map()

Gets the user and default config for polling and merges them

Why have a config abstraction for virtually the same values seen in ExAws.SQS?

  1. In case config changes from the ExAws side. EPoller’s client shouldn’t know what the underlying implementation of SQS polling is and shouldn’t have to deal with it
  2. We don’t necessarily want to config all parameters. Polling might not function as promised if we start tweaking too many knobs (relates to 1).