rabbot icon indicating copy to clipboard operation
rabbot copied to clipboard

Separation of rabbot instances

Open OSN64 opened this issue 7 years ago • 0 comments

Rabbot seems to only use one client/connection per application instance. When the module is required multiple times, each instance cant be configured to a separate server. They all use the same server, even after .configure has been called.

An example of this.

const rabbot_1 = require('rabbot');
const rabbot_2 = require('rabbot');

rabbot_1.configure({server1});
rabbot_2.configure({server2});


rabbot_2.publish({'ex.1', { type: 'MyMessage', body: 'hello!' }); // pushes message to server 1
rabbot_2.shutdown(); // closes the connection to server 1

OSN64 avatar Aug 13 '18 05:08 OSN64