@luckys_luis/nuxt-laravelize-events-queue
v0.2.1
Published
Queued-listener adapter joining Nuxt Laravelize events and queue
Readme
@luckys_luis/nuxt-laravelize-events-queue
Espanol | English
Queued-listener adapter joining Nuxt Laravelize events and queue
Install
pnpm add @luckys_luis/nuxt-laravelize-events-queue// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@luckys_luis/nuxt-laravelize-events-queue'],
})Package-specific usage
The package exposes a small, explicit surface. Configure its dependencies from an application provider or adapter and test its boundaries before promoting it to production.
Public entrypoints
Use only these public entrypoints. Paths not listed here are internals and may change without notice.
| Entrypoint | Use |
|---|---|
| package root | Public entrypoint for this package. |
| ./runtime | Public entrypoint for this package. |
Queued event listeners
@luckys_luis/nuxt-laravelize-events-queue connects listeners marked with shouldQueue: true to a queue without coupling the base packages.
pnpm add @luckys_luis/nuxt-laravelize-events @luckys_luis/nuxt-laravelize-queue @luckys_luis/nuxt-laravelize-events-queueclass WelcomeUserListener implements Listener<UserRegistered> {
readonly shouldQueue = true as const
async handle(event: UserRegistered) { /* send welcome message */ }
}
events.listen(UserRegistered, welcomeUserListenerToken)
await events.dispatch(new UserRegistered('user_1'))| API | Purpose |
|---|---|
| EventRegistry.register() | Registers serializable event constructors by name. The adapter calls it automatically. |
| EventRegistry.make(name, args) | Recreates a registered event from constructor arguments. |
| QueueListenerAdapter.enqueue() | Enqueues events that implement toPayload() as a ListenerJob; returns false for other events. |
| ListenerJob | Resolves and runs the original listener inside the queue worker. |
| eventRegistryToken | Resolves the shared registry. |
Compatibility and boundaries
Respect the at-least-once delivery, durability, authorization, tenant isolation, and secret-handling warnings in the reference section. Examples do not replace server-side authentication, authorization, or validation.
The shared API and security reference lives in the module guide. This page summarizes this package's contract and keeps copy-pasteable examples.
Related packages
@luckys_luis/nuxt-laravelize-events, @luckys_luis/nuxt-laravelize-queue.
