CargueroTaskBunny.Publisher (CargueroCargueroTaskBunny v0.0.7) View Source

Conviniences for publishing messages to a queue.

It's a semi private module and provides lower level functions. You should use Job.enqueue to enqueue a job from your application.

Link to this section Summary

Functions

Publish a message to the queue.

Similar to publish/4 but raises exception on error. It calls the publisher worker to publish the message on the queue

Link to this section Functions

Link to this function

exchange_publish(host, exchange, queue, message, options \\ [])

View Source

Specs

exchange_publish(atom(), String.t(), String.t(), String.t(), keyword()) ::
  :ok | {:error, any()}
Link to this function

exchange_publish!(host, exchange, queue, message, options \\ [])

View Source

Specs

exchange_publish!(atom(), String.t(), String.t(), String.t(), keyword()) :: :ok
Link to this function

publish(host, queue, message, options \\ [])

View Source

Specs

publish(atom(), String.t(), String.t(), keyword()) :: :ok | {:error, any()}

Publish a message to the queue.

Returns :ok when the message has been successfully sent to the server. Otherwise returns {:error, detail}

Link to this function

publish!(host, queue, message, options \\ [])

View Source

Specs

publish!(atom(), String.t(), String.t(), keyword()) :: :ok

Similar to publish/4 but raises exception on error. It calls the publisher worker to publish the message on the queue