Comments (4)
@ttshivers Are you able to give us some hand on this one?
@Nathan-Nesbitt What's the expected behavior? Would you be able to create a PR with the actual fix?
from nestjs.
I can tell you what the issue/fix might be.
I tried setting up a global exception handler with NestJS. Each time I would trigger and catch any exception with it, a second log was printed from your library. (See the log above)
For NestJS, seems next()
within the handler is returning {}
instead of void
which is causing issues, as you've got a line of code that logs a warning each time the return type is anything but void.
The easiest fix is probably to remove the logging for that if you support NestJS exception handling. The better fix probably had to do with why it's returning {}
and if that's intended or not
from nestjs.
This is the location, and it's repro-able using the basic implementation of the RPC exception handler from nestJS and your subscription setup.
from nestjs.
@Nathan-Nesbitt Thanks for all the information.
What you're saying makes sense but this could have been an intentional API design decision as a subscription in fact should never return. Your use case of providing a nack
should never happen manually therefore, you will receive a weird behaviour when throwing an error and a nack one after the other.
Unfortunately, i don't have the time to tweak this and make it so the end user can control this behaviour but if you could help us improving the existing API extending it so that the consumer can override the default behaviour i would be happy to review 😄
from nestjs.
Related Issues (20)
- ERROR Error: Channel closed by server: 404 (NOT-FOUND) with message "QueueNotExist, ReqId:659E6FF13837453200DC44F9, ErrorHelp[queue=amq.rabbitmq.reply-to,consumerTag=null,autoAck, https://c.tb.cn/F3.Zro5uI]" HOT 1
- RabbitMQ publish doesn't take advantage of amqp-connection-manager's reliable publish HOT 2
- Separate publisher/consumer connections for rabbitmq HOT 7
- Support pre-defined consumer tag HOT 1
- [RabbitMQ] AmqpConnection.request() unhandled exception when losing connection HOT 2
- Gracefully shutdown rabbitmq subscribers HOT 6
- Support Module register with undefined config: RabbitMQModule.forRoot(RabbitMQModule, undefined) HOT 1
- consumer won't re attach to a queue when rabbitmq cluster gets restarted in 1/5 cases
- discover graphql mutations, queries, subscriptions? HOT 2
- Publish new release for @golevelup/nestjs-rabbitmq HOT 1
- Param error in stripe.checkout.sessions.listLineItems
- Publish on AmqpConnection not returning boolean? HOT 1
- Can not npm install on a new project due to reflect-metadata peerDependency HOT 6
- Logging Errors
- @golevelup/ts-jest default mocks return an empty object which is inconsistent with jest.fn() which returns undefined.
- @golevelup/nestjs-rabbitmq- error when publish message: Channel closed
- ts-jest - When function is called with a mock, toHaveBeenCalledWith() always succeed even when it should not
- rabbitmq: allow per subscriber/handler deserializer customization HOT 1
- RabbitMQ AmqpConnection access from child module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestjs.