aggregator.broker.connector

General function to establish a connection to the local broker.

close-channel

(close-channel ch)

Given a channel, close it!

close-connection!

(close-connection!)

Close connection to message broker.

connected?

(connected?)

Check if connection to broker is established.

create-queue

(create-queue queue-name exchange)(create-queue queue-name)

Creates a queue for a given aggregator. Uses aggregator as the queue name and binds this queue to the default exchange if no other is provided. Typically, aggregator is the hostname of the aggregator.

Example: (create-queue “statements”)

delete-queue

(delete-queue queue)

Given a queue-name, delete it!

entrypoint

(entrypoint)

init-connection!

(init-connection!)

Initializes connection to broker and creates an exchange.

open-channel

(open-channel)

Opens a channel for an existing connection to the broker.

queue-exists?

(queue-exists? queue)

Check if queue exists. Returns a Boolean when connection is established.

with-connection

macro

(with-connection error-msg & body)