bus icon indicating copy to clipboard operation
bus copied to clipboard

Persistent messages are not supported.

Open NurdinDev opened this issue 2 years ago • 2 comments

Hi,

By default, any message is non-persistent. To change it to persistent, we must send deliveryMode: 2 during the message publication. However, it appears that there is no way to pass deliveryMode to publish a message, as seen here:

We will open a new pull request for it.

NurdinDev avatar Nov 28 '23 13:11 NurdinDev

By the way, amqplib supports two options: persistent and deliveryMode. Persistent is a simple boolean that aligns well with the concept it represents (whether a message is persistent or not).

  • persistent (boolean): If truthy, the message will survive broker restarts provided it’s in a queue that also survives restarts. Corresponds to, and overrides, the property deliveryMode.
  • deliveryMode (boolean or numeric): Either 1 or falsey, meaning non-persistent; or, 2 or truthy, meaning persistent. That’s just obscure though. Use the option persistent instead. reference

NurdinDev avatar Nov 28 '23 14:11 NurdinDev

@adenhertog this issue closed by the PR #213

manarhusrieh avatar Dec 31 '23 11:12 manarhusrieh