Stargate.Producer.start_link

You're seeing just the function start_link, go back to Stargate.Producer module for more information.

Specs

start_link(keyword()) :: GenServer.on_start()

Start a producer websocket process and link it to the current process.

Producer options require, at minimum:

* `host` is a tuple of the address or URL of the Pulsar cluster (broker service)
  and the port on which the service is exposed.
* `tenant` is a string representing the tenant portion of the producer URL path parameter.
* `namespace` is a string representing the namespace portion of the producer URL path parameter.
* `topic` is a string representing the topic portion of the producer URL path parameter.
* `registry` is the name of the process registry associated to the client's supervision tree.
  Stargate uses this to send messages back and forth between the producer and its acknowledger.

Additional optional parameters to a producer are:

* `protocol` can be one of "ws" or "wss"; defaults to "ws"
* `persistence` can be one of "persistent" or "non-persistent" per the Pulsar
  specification of topics as being in-memory only or persisted to the brokers' disks.
  Defaults to "persistent".
* `query_params` is a map containing any or all of the following:

    * `send_timeout` the time at which a produce operation will time out; defaults to 30 seconds
    * `batch_enabled` can be true or false to enable/disable the batching of messages.
      Defaults to "false".
    * `batch_max_msg` defines the maximum number of messages in a batch (if enabled).
      Defaults to 1000.
    * `max_pending_msg` defines the maximum size of the internal queue holding messages. Defaults
      to 1000.
    * `batch_max_delay` sets the time period within which message batches will be published.
      Defaults to 10 milliseconds.
    * `routing_mode` can be one of :round_robin or :single. _Pulsar has deprecated this parameter_.
    * `compression_type` can be one of :lz4, :zlib, or :none. Defaults to :none
    * `name` is used to enforce only one producer with the given name is publishing to
      connected topic.
    * `initial_seq_id` sets the baseline for the sequence ids assigned to published messages.
    * `hashing_scheme` can be one of :java_string or :murmur3 when defining a hashing function to
      use with partitioned topics. _Pulsar has deprecated this parameter_.