Comments (5)
Are you referring to Singleton, Request or Transient Scopes in the context of the Discovery Service?
from nestjs.
Are you referring to Singleton, Request or Transient Scopes in the context of the Discovery Service?
Yes wondering if possible to know the scope of discovered providers or controllers?
I believe the data is in the underlying NestJS framework. This is a fantastic library btw! The same code without the library gets quite tedious.
from nestjs.
@jasperblues Sorry for the delayed response, I've been on vacation this past week. Currently it is only possible to discover Singleton services as the discovery service works by integrating with the Module Initialization lifecycle hook. During this time these are the only dependencies that can actually be resolved from the container.
Request scoped dependencies are explicitly filtered out because given the use case that this library supports it doesn't really make sense to get an instance of one. I'm open to the possibility of trying to expand functionality around non singleton dependencies though if there's new and interesting use cases that this would open up.
I'm glad you're enjoying the library so far, do you mind expanding a bit on what you're currently using it for and how accessing these other scopes might be helpful?
from nestjs.
@jasperblues I'm going to close this for now. Feel free to continue the conversation from my previous comment
from nestjs.
@jasperblues Sorry for the delayed response, I've been on vacation this past week. Currently it is only possible to discover Singleton services as the discovery service works by integrating with the Module Initialization lifecycle hook. During this time these are the only dependencies that can actually be resolved from the container.
I wanted to ensure that my decorator based job scheduler only applied to singletons, so this meets my needs. Thanks a lot for the response, and again for the excellent library.
from nestjs.
Related Issues (20)
- Typo in webhooks package
- Creating a decorator and use it within the application from external provider HOT 3
- Multiple RabbitSubscribe Decorators in the Same Provider rotates through decorated methods rather than invoking the correct method HOT 2
- Multiple Stripe instances HOT 3
- [RabbitMQ] create queues without consumer HOT 1
- Re-queue with with x-delay HOT 2
- Error Channel ended, no reply will be forthcoming HOT 2
- Multiple Stripe instances with different Webhook endpoints HOT 1
- Feature (rabbitmq): persistent reply-to responses HOT 4
- Initializing Rabbit Module creates random queues HOT 6
- @nestjs-plus/discovery possible issue with nestjs 10.3.0 HOT 1
- 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
- `Subscribe handlers should only return void` logged if using RpcException or RpcExceptionFilter HOT 4
- 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
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.