View Source PulsarEx.Connection.ConsumerCallback behaviour (PulsarEx v0.14.2)

Summary

Types

@type message_id() :: {integer(), integer()}

Callbacks

Link to this callback

ack(conn, consumer_id, ack_type, msg_ids, deadline)

View Source
@callback ack(
  conn :: pid(),
  consumer_id :: integer(),
  ack_type :: atom(),
  msg_ids :: [message_id()],
  deadline :: integer()
) :: :ok | {:error, term()}
Link to this callback

close_consumer(conn, consumer_id)

View Source
@callback close_consumer(conn :: pid(), consumer_id :: integer()) ::
  :ok | {:error, term()}
Link to this callback

flow_permits(conn, consumer_id, permits)

View Source
@callback flow_permits(conn :: pid(), consumer_id :: integer(), permits :: integer()) ::
  :ok | {:error, term()}
Link to this callback

redeliver(conn, consumer_id, msg_ids)

View Source
@callback redeliver(conn :: pid(), consumer_id :: integer(), msg_ids :: [message_id()]) ::
  :ok | {:error, term()}
Link to this callback

subscribe(conn, consumer_id, topic_name, subscription, sub_type, consumer_opts, deadline)

View Source
@callback subscribe(
  conn :: pid(),
  consumer_id :: integer(),
  topic_name :: String.t(),
  subscription :: String.t() | atom(),
  sub_type :: String.t() | atom(),
  consumer_opts :: keyword(),
  deadline :: integer()
) :: {:ok, map()} | {:error, term()}