Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending headers documentation #360

Open
siraajahmed opened this issue Feb 22, 2018 · 1 comment
Open

Sending headers documentation #360

siraajahmed opened this issue Feb 22, 2018 · 1 comment

Comments

@siraajahmed
Copy link

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' } );

@swilliams-a3digital
Copy link

swilliams-a3digital commented Feb 22, 2018

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.

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

No branches or pull requests

2 participants