You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you send a message without any headers (we didn't know you had to send headers and where you would send them), the messages do not get persisted (despite the ActiveMQ documentation that says it does it by default).
Anyway, turns out you have to send messages with a durable header to node-amqp10 for persisted messages to work. THIS IS NOT OBVIOUS. This should be documented. Just putting it here in case anyone else comes across the same issue.
Code example of when you send without headers: sender.send("messageBody");
Code example of when you send with headers (this should be documented):
Thanks for the message, I've been banging my head against the wall trying to figure out how to make messages durable. Your snippet above solved my problem. It would be great to add that snippet to the documentation.
Noticed an issue with ActiveMQ and this library.
When you send a message without any headers (we didn't know you had to send headers and where you would send them), the messages do not get persisted (despite the ActiveMQ documentation that says it does it by default).
Anyway, turns out you have to send messages with a durable header to node-amqp10 for persisted messages to work. THIS IS NOT OBVIOUS. This should be documented. Just putting it here in case anyone else comes across the same issue.
Code example of when you send without headers:
sender.send("messageBody");
Code example of when you send with headers (this should be documented):
sender.send( { header: { durable: true }, body: 'messageBody' } );
The text was updated successfully, but these errors were encountered: