Centralizing Logging and Auth in Moleculer with Action Middleware
Stop copying auth and logging boilerplate into every Moleculer action. This guide builds composable action middleware, wires it into a service, and verifies it with real broker calls.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop copying auth and logging boilerplate into every Moleculer action. This guide builds composable action middleware, wires it into a service, and verifies it with real broker calls.
Use Moleculer’s built‑in action cache to serve repeat reads from memory, reduce latency, and avoid external caching layers. Learn how to configure cache, invalidate via events, and handle the trade‑offs in a microservice environment.
Learn how Moleculer’s declarative caching works, how to wire it up with Redis, and what trade‑offs you need to consider. A step‑by‑step example shows caching a timestamp action and invalidation via events.
A technical decision guide for selecting the right Moleculer transporter. Compare NATS, Redis, JetStream, and AMQP based on durability, latency, and operational cost.
A step‑by‑step diagnostic guide for resolving Moleculer 'Action not found' errors caused by version mismatches, registration failures, typos, caching, or serializer issues.
Moleculer ships timeout, retry, circuit‑breaker and bulkhead middlewares that compose declaratively via a policy object—eliminating the need for external resilience libraries. Understand the execution order, state sync, and cancellation wiring.
Learn how Moleculer’s Registry automatically finds services and distributes calls using a NATS transporter, plus verification steps and known limits.
Learn how to turn on Moleculer’s built‑in action caching, configure a storage backend, verify cache hits, and roll back the change if needed.
When a Moleculer service fails to start with a transport error, this guide walks through the most common misconfigurations, step‑by‑step checks, and fixes— from missing env vars to broker reachability. It’s a practical diagnostic flow you can run in minutes.