Please note that this is early development software that lacks proper documentation, tests, and a lot of useful or even necessary features.
Connect to Genericore (using AMQP). Possible config object properties:
connection: The options object of node-amqp's
reconnect_timeout: If set to a number then trigger a reconnect that number of milliseconds after a connection error occured.
input: If set to an AMQP exchange name then subscribe to that exchange (using an auto-generated, exclusive queue).
output: If set to an AMQP exchange name then publish to that exchange (using type = fanout).
Possible callbacks object properties (if any of the properties is undefined when the event occurs, then the default (no op if not specified else) gets called. I. e. callbacks may be modified at any time):
ready: Called when the
outputexchange was opened successfully with an object parameter with following properties:
publish: A function taking a single string parameter to publish to the
outputexchange. Undefined if no
inputexchange was named.
end: A function taking no parameters to shutdown the connection to Genericore.
message: Called when a message gets published at the
inputexchange with the message as a string parameter.
end: Called when the connection to Genericore is closed.
error: (default: reconnect or, if
reconnect_timeoutis not set, throw error) Called when a connection error occurs.
debug: Called when a debug message occurs. Defaults to