PulsarEx.produce

You're seeing just the function produce, go back to PulsarEx module for more information.
Link to this function

produce(topic, payload, message_opts \\ [])

Synchronously produce message to pulsar, with default producer options

Being able to asynchronously send messages to pulsar is awesome, but being not able to catch the

errors sucks. So this sync version uses the async send, but wait for the batched/async sends to return

with result, pretty much like a future.

#

Example Producer Configs:

   config :pulserl,
     producer_opts: [
       properties: [test: true, env: staging],
       batch_enable: true
     ]

Examples

iex> PulsarEx.produce("test-topic", "test-payload", event_time: :os.system_time(:millisecond))

Default pulserl producer options are picked up from configs:

producer_name :: string()

properties = [] :: keyword() | %{term() => term()}

send_timeout = 30000 :: non_neg_integer()

Timeout sending messages to pulsar, defaults to 30 seconds.

Setting it to 0 means infinity

initial_sequence_id :: non_neg_integer()

batch_enable = true :: boolean()

routing_mode = :round_robin_routing :: :single_routing | :round_robin_routing

block_on_full_queue :: boolean()

batch_max_messages = 1000 :: non_neg_integer()

batch_max_delay_ms = 10 :: non_neg_integer()

max_pending_requests = 50000 :: non_neg_integer()

max_pending_requests_across_partitions = 100000 :: non_neg_integer()

Available PulsarEx message options:

timeout = 3000,

Timeout value for successfully send out the message to broker

partition_key, ordering_key :: string()

event_time :: non_neg_integer()

properties :: %{string() => string()} | [{string(), string()}]

deliver_at_time :: non_neg_integer(),

For delayed message delivery