Liking cljdoc? Tell your friends :D

sisyphus.rabbit


-mainclj

(-main & args)
source

close!clj

(close! rabbit)

Close the connection represented by the given rabbitmq connection map.

Close the connection represented by the given rabbitmq connection map.
sourceraw docstring

config-keysclj

source

connect!clj

(connect! config)

Connect to the rabbitmq service. Accepts a config map containing several possible options:

  • :queue - name of the rabbit queue to connect to (default 'sisyphus')
  • :exchange - name of the exchange to connect to (defaults to global exchange '')
  • :routing-key - routing key to use for messages (defaults to 'sisyphus') Returns a map containing all of the rabbitmq connection information.
Connect to the rabbitmq service. Accepts a `config` map containing several possible options:
  * :queue - name of the rabbit queue to connect to (default 'sisyphus')
  * :exchange - name of the exchange to connect to (defaults to global exchange '')
  * :routing-key - routing key to use for messages (defaults to 'sisyphus')
Returns a map containing all of the rabbitmq connection information.
sourceraw docstring

default-handle-messageclj

(default-handle-message channel metadata payload)

An example of the handle argument passed into start-consumer!. Takes three arguments that are provided by the rabbit consumer client:

  • channel - the channel to the rabbit service.
  • metadata - any information about the incoming message beyond its payload.
  • payload - bytes representing the message just received.
An example of the `handle` argument passed into `start-consumer!`. Takes three arguments that
are provided by the rabbit consumer client:
  * channel - the channel to the rabbit service.
  * metadata - any information about the incoming message beyond its payload.
  * payload - bytes representing the message just received.
sourceraw docstring

publish!clj

(publish! rabbit message)

Publish a message on the given rabbitmq connection. The message will be rendered to JSON before sending, so you can pass in any renderable data structure, and strings will be further quoted.

Publish a message on the given rabbitmq connection. The message will be rendered to JSON before
sending, so you can pass in any renderable data structure, and strings will be further quoted.
sourceraw docstring

start-consumer!clj

(start-consumer! rabbit handle)

Given the rabbit connection map and a handle function, start a rabbit consumer listening to the queue and exchange represented by that connection, which calls handle each time it receives a message. The handle function takes three arguments, channel, metadata and payload, and an example is given in the below function default-handle-message in this ns.

Given the rabbit connection map and a `handle` function, start a rabbit consumer listening
to the queue and exchange represented by that connection, which calls `handle` each time it
receives a message. The `handle` function takes three arguments, `channel`, `metadata` and
`payload`, and an example is given in the below function `default-handle-message` in this ns.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close