@easybits/rmqmci-ts
v2.4.0
Published
This package exports abstract class ModuleInterface that could be used for creating new modules.
Readme
RMQMCI for TypeScript
This package exports abstract class ModuleInterface that could be used for creating new modules.
Creating a module class
class TestModule extends ModuleInterface {
callback = (message: UnifiedMessage): void => {
// handle incoming messages here
}
}Creating a module instance
const testModule = new TestModule(options)Options object should contain information required for RabbitMQ connection.
{
url: string // RabbitMQ server url
incoming: {
queue: string // Incoming queue name
}
outgoing: {
exchange: string // Outgoing exchange name
}