MonsterAI .Lab

Flutter • Rust • Next.js

返回首页
NestJS

NestJS 微服务架构:基于 Redis / RabbitMQ 传输器与事件发布订阅

Waitwalker2026-08-2615 min
## 1. 混合微服务应用启动 ```typescript const app = await NestFactory.create(AppModule); app.connectMicroservice<MicroserviceOptions>({ transport: Transport.RMQ, options: { urls: ["amqp://guest:guest@localhost:5672"], queue: "order_queue", }, }); await app.startAllMicroservices(); await app.listen(3000); ```
#NestJS#微服务#RabbitMQ#分布式
回到文章列表 →