Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ module.exports = adapter;
* @param {String} uri AMQP uri
* @param {Object} opts Options for the connection.
* @param {String} [opts.queueName='']
* @param {String} [opts.channelSeperator='#']
* @param {String} [opts.channelSeparator='#']
* @param {String} [opts.prefix='']
* @param {Boolean} [opts.useInputExchange=false]
* @param {Object} [opts.amqpConnectionOptions={}]
* @param {function} onNamespaceInitializedCallback This is a callback function that is called everytime sockets.io opens a
* new namespace. Because a new namespace requires new queues and exchanges,
* you can get a callback to indicate the success or failure here. This
Expand All @@ -70,9 +71,10 @@ function adapter(uri, opts, onNamespaceInitializedCallback)

underscore.defaults(opts, {
queueName: '',
channelSeperator: '#',
channelSeparator: '#',
prefix: '',
useInputExchange: false
useInputExchange: false,
amqpConnectionOptions: {},
});

const prefix = opts.prefix;
Expand All @@ -88,7 +90,7 @@ function adapter(uri, opts, onNamespaceInitializedCallback)
{
Adapter.call(this, nsp);

const amqpConnectionOptions = {};
const amqpConnectionOptions = opts.amqpConnectionOptions;

const amqpExchangeOptions = {
durable: true,
Expand Down Expand Up @@ -392,7 +394,7 @@ function adapter(uri, opts, onNamespaceInitializedCallback)

function getChannelName()
{
return Array.prototype.join.call(arguments, opts.channelSeperator) + opts.channelSeperator;
return Array.prototype.join.call(arguments, opts.channelSeparator) + opts.channelSeparator;
}

return AMQPAdapter;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socket.io-amqp",
"version": "2.0.0",
"version": "2.0.1",
"description": "A Sockets.IO Adapter for AMQP & RabbitMQ",
"main": "lib/main.js",
"directories": {
Expand Down