Skip to content

feat(rabbitmq): add support for persistent messages#15

Open
abumostafa wants to merge 1 commit intonestjstools:mainfrom
abumostafa:add-message-persistent-option
Open

feat(rabbitmq): add support for persistent messages#15
abumostafa wants to merge 1 commit intonestjstools:mainfrom
abumostafa:add-message-persistent-option

Conversation

@abumostafa
Copy link
Copy Markdown

@abumostafa abumostafa commented Jan 20, 2026

Adds an optional persistent flag when publishing messages to RabbitMQ.

When enabled, messages are published with deliveryMode = 2, allowing them to survive broker restarts when used with durable queues. This is essential for reliable delivery and outbox-style patterns, while remaining fully backward-compatible.

How to use it

await this.messageBus.dispatch(
  new RoutingMessage(
    envelope,
    eventKey,
    new AmqpMessageOptions(undefined, undefined, undefined, undefined, undefined, true)
  )
)

@abumostafa abumostafa changed the title Add message persistent option feat(rabbitmq): add support for persistent messages Jan 21, 2026
@Sebastian-Iwanczyszyn
Copy link
Copy Markdown
Contributor

Hey, thanks for PR. Please fix the CI I will test it locally also and w can merge it :)

@abumostafa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants