Giter VIP home page Giter VIP logo

Comments (7)

mcblum avatar mcblum commented on May 22, 2024

Edit: Ok apparently I asked the wrong question. I see the binding, but for some reason the handler function never actually gets triggered. I've tried using * for a routing key, and using a specific routing key. In Rabbit, all of the messages look like this:

Screen Shot 2019-08-16 at 1 54 32 PM

If the binding is being created, which it is, then I assume the subscriber is working. Any idea why that function never gets called?

I also see this:
Screen Shot 2019-08-16 at 2 19 53 PM
which I assume means that Rabbit is spamming the connection with delivery attempts, none of which are succeeding?

from nestjs.

mcblum avatar mcblum commented on May 22, 2024

Apparently, I'm answering my own questions here :) I didn't realize those decorators couldn't be used in a controller, which is why the binding was working but the function was never being called. I've fixed that, but don't see in the docs how to handle the response from @RabbitRPC. With NestJS' default implementation you'd do .subscribe((res) => {}) but I don't see docs for that here. Am I misunderstanding how this works vs. Nest's default?

from nestjs.

mcblum avatar mcblum commented on May 22, 2024

Once again, given enough time, apparently I learn how to read. Should anyone else struggle with this coming from NestJS' default implementation, make sure if you want a response to your message you use await this.amqp.request and not await this.amqp.publish

from nestjs.

WonderPanda avatar WonderPanda commented on May 22, 2024

Hey @mcblum Sorry I didn't get back right away, I'm actually on vacation this week so haven't been keeping an eye on this. Thanks for checking out the library and I'm glad that you got things sorted out! Feel free to open issues if you do run into any issues or limitations with the current capabilities of the librar

from nestjs.

mcblum avatar mcblum commented on May 22, 2024

@WonderPanda all good, no worries at all! It's so great - thank you for putting this together. It took a bit for me to stop doing dumb things, but eventually, I got everything working great. I made a small wrapper around the request method using observables and now everything is great.

Really appreciate your hard work on this, it's so awesome to be up and running!

from nestjs.

WonderPanda avatar WonderPanda commented on May 22, 2024

@mcblum That sounds awesome! Did you want to contribute the Observable wrapper back to the library? I can see that being something more people might be interested in. I'm happy to merge pull requests for good additions

from nestjs.

mcblum avatar mcblum commented on May 22, 2024

@WonderPanda yeah dude, I'll do that!

from nestjs.

Related Issues (20)

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.