View Source PulsarEx (PulsarEx v0.14.2)

Summary

Functions

List all the consumers on default cluster

List all the consumers for cluster

List all the consumers for cluster on a specific topic

List all the consumers for cluster on a specific topic with specific subscription

Publish a message to pulsar, create a pool of producers if not yet created

Start consumer from a fully quantified topic

Stop consumers with fully quantified topic

Stop consumers with topic pattern

Types

@type namespace() :: String.t() | Regex.t()
@type subscription() :: String.t()
@type tenant() :: String.t() | Regex.t()
@type topic() :: String.t() | Regex.t()
@type topic_name() :: String.t()

Functions

List all the consumers on default cluster

List all the consumers for cluster

Link to this function

consumers(cluster_name, topic_name)

View Source

List all the consumers for cluster on a specific topic

Link to this function

consumers(cluster_name, topic_name, subscription)

View Source

List all the consumers for cluster on a specific topic with specific subscription

Link to this function

produce(topic_name, payload, message_opts \\ [], producer_opts \\ [])

View Source
@spec produce(String.t(), binary(), keyword(), keyword()) ::
  {:ok,
   %PulsarEx.Proto.MessageIdData{
     __unknown_fields__: term(),
     ack_set: term(),
     batch_index: term(),
     batch_size: term(),
     entryId: term(),
     ledgerId: term(),
     partition: term()
   }}
  | {:error, any()}

Publish a message to pulsar, create a pool of producers if not yet created

Link to this function

start_consumer(topic_name, subscription, module, opts)

View Source
@spec start_consumer(topic_name(), subscription(), module(), keyword()) ::
  :ok | {:error, any()}

Start consumer from a fully quantified topic

Link to this function

start_consumer(tenant, namespace, topic, subscription, module, opts)

View Source
@spec start_consumer(
  tenant(),
  namespace(),
  topic(),
  subscription(),
  module(),
  keyword()
) ::
  :ok | {:error, any()}

Start consumers with topic pattern

Link to this function

stop_consumer(topic, subscription)

View Source
@spec stop_consumer(topic(), subscription()) :: :ok

Stop consumers with fully quantified topic

Link to this function

stop_consumer(tenant, namespace, topic, subscription)

View Source
@spec stop_consumer(tenant(), namespace(), topic(), subscription()) :: :ok

Stop consumers with topic pattern