1.8.1 • Published 8 months ago
@moberries/rmqmci-ts v1.8.1
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
}