(create-connection-factory
{:keys [hosts port vhost user password publisher-confirms
publisher-confirm-type publisher-returns request-heartbeat
connection-timeout cache-mode on-connection-closed
on-connection-opened]
:or {request-heartbeat 10
publisher-returns false
user "guest"
on-connection-opened default-on-connection-opened
hosts "localhost"
password "guest"
publisher-confirm-type :async
on-connection-closed default-on-connection-closed
port 5672
connection-timeout 60
publisher-confirms true
vhost "/"
cache-mode :channel}
:as opts})
(create-message payload
headers-map
{:keys [timestamp persistent? content-encoding app-id cluster-id
content-length correlation-id message-id reply-to
redelivered? type user-id priority expiration]
:or {content-encoding "UTF-8"
timestamp (Date.)
content-length 0
redelivered? false
priority 0}})
(create-message-consumer connection
queue
handler-fn
{:keys [prefetch-count exclusive? recovery-interval
concurrent-consumers auto-ack? batch
requeue-rejected]
:or {prefetch-count 1
exclusive? false
recovery-interval 60000
concurrent-consumers 1
auto-ack? false
batch {:parallel-handling? true}
requeue-rejected true}}
error-handler
statistics-handler)
(create-rabbit-batch-template
connection-factory
&
[{:keys [batch-size buffer-limit timeout]
:or {batch-size 25 buffer-limit Integer/MAX_VALUE timeout 50}}])
(create-rabbit-template connection-factory
{:keys [publisher-returns publish-retry-policy]
:or {publisher-returns false}})
(create-rpc-message-consumer connection
queue
handler-fn
reply-fn
{:keys [prefetch-count exclusive? recovery-interval
concurrent-consumers]
:or {prefetch-count 1
exclusive? false
recovery-interval 60000
concurrent-consumers 1}})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close