Git Product home page Git Product logo

bus-starter's Issues

Running the starter with RabbitMQ does not seem to work

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.