node-ts / bus-starter Goto Github PK
View Code? Open in Web Editor NEWA starter project for @node-ts/bus for building distributed message based systems with node
Home Page: https://node-ts.github.io/bus/
A starter project for @node-ts/bus for building distributed message based systems with node
Home Page: https://node-ts.github.io/bus/
Hi,
first of all thank you for those libraries! I was looking for quite a long time to have anything in the spirit of NServiceBus that is transport agnostic. So this looks really great!
I tried to adjust the transport mechanism of the starter project to use the RabbitMQ as the transport layer. I tested via the suggested docker container (https://node-ts.github.io/bus/packages/bus-rabbitmq/) and via cloudamqp.
I changed the application-container.ts
file for the following (without the RabbitMQ it works):
import { Container } from "inversify";
import { BusModule } from "@node-ts/bus-core";
import { LoggerModule } from "@node-ts/logger-core";
import { WinstonModule } from "@node-ts/logger-winston";
import { HandlersModule } from "./handlers/handlers-module";
import { BusWorkflowModule } from "@node-ts/bus-workflow";
import {
BUS_RABBITMQ_SYMBOLS,
BusRabbitMqModule,
RabbitMqTransportConfiguration
} from "@node-ts/bus-rabbitmq";
const rabbitConfiguration: RabbitMqTransportConfiguration = {
queueName: "accounts-application-queue",
connectionString: "amqp://guest:guest@localhost"
};
export const container = new Container();
container.load(new LoggerModule());
container.load(new BusModule());
container.load(new BusRabbitMqModule());
container.load(new WinstonModule());
container.load(new BusWorkflowModule());
container.load(new HandlersModule());
container
.bind(BUS_RABBITMQ_SYMBOLS.TransportConfiguration)
.toConstantValue(rabbitConfiguration);
The error I see is the following:
TypeError: Cannot read property 'map' of undefined
at RabbitMqTransport.bindExchangesToQueue (C:\Projects\my-bus-app\node_modules\@node-ts\bus-rabbitmq\dist\rabbitmq-transport.js:81:14)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async RabbitMqTransport.initialize (C:\Projects\my-bus-app\node_modules\@node-ts\bus-rabbitmq\dist\rabbitmq-transport.js:24:9)
at async ApplicationBootstrap.initialize (C:\Projects\my-bus-app\node_modules\@node-ts\bus-core\dist\application-bootstrap\application-bootstrap.js:23:13)
at async initialize (C:\Projects\my-bus-app\dist\index.js:21:5)
Other than that I did not change anything. Would there be other steps involved that I would need to implement?
Thanks!
P.S. with PostgreSQL as the transport layer it worked. The documentation was a bit off, I created a pull request for it.
sry - posted with wrong user
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.