ExMessageDB v0.1.0 ExMessageDB.Adapter View Source

Adapter.

Link to this section Summary

Link to this section Functions

Link to this function

get_category_messages(category_name, position, batch_size, correlation, consumer_group_member, consumer_group_size, condition, opts)

View Source

Specs

get_category_messages(
  category_name :: String.t(),
  position :: non_neg_integer() | nil,
  batch_size :: non_neg_integer() | -1 | nil,
  correlation :: String.t() | nil,
  consumer_group_member :: String.t() | nil,
  consumer_group_size :: String.t() | nil,
  condition :: Keyword.t() | nil,
  opts :: [{:repo, Ecto.Repo.t()}]
) ::
  [] | [%{message: ExMessageDB.Message.t()}] | {:error, message :: String.t()}
Link to this function

get_last_stream_message(stream_name, opts)

View Source

Specs

get_last_stream_message(
  stream_name :: String.t(),
  opts :: [{:repo, Ecto.Repo.t()}]
) :: nil | %{message: ExMessageDB.Message.t()}
Link to this function

get_stream_messages(stream_name, position, batch_size, condition, opts)

View Source

Specs

get_stream_messages(
  stream_name :: String.t(),
  position :: non_neg_integer() | nil,
  batch_size :: non_neg_integer() | -1 | nil,
  condition :: Keyword.t() | nil,
  opts :: [{:repo, Ecto.Repo.t()}]
) ::
  [] | [%{message: ExMessageDB.Message.t()}] | {:error, message :: String.t()}
Link to this function

message_store_version(opts)

View Source

Specs

message_store_version(opts :: [{:repo, Ecto.Repo.t()}]) ::
  string_version :: String.t()
Link to this function

write_message(id, stream_name, type, data, metadata, expected_version, opts)

View Source

Specs

write_message(
  id :: String.t(),
  stream_name :: String.t(),
  type :: String.t(),
  data :: map(),
  metadata :: map() | nil,
  expected_version :: non_neg_integer() | -1 | nil,
  opts :: [{:repo, Ecto.Repo.t()}]
) :: {:ok, position :: non_neg_integer()} | {:error, message :: String.t()}