-
Notifications
You must be signed in to change notification settings - Fork 8
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
Publisher Confirms - How to use #2
Comments
Refer to the official (server) documentation for more information on publisher confirms https://www.rabbitmq.com/confirms.html#publisher-confirms
You can enable publisher confirms with Full example: import {Connection} from 'rabbitmq-client'
const rabbit = new Connection()
async function main() {
const ch = await rabbit.acquire()
await ch.confirmSelect()
await ch.basicPublish({routingKey: 'foo.bar'}, 'some-example-data')
await ch.basicPublish({routingKey: 'foo.bar'}, 'some-other-data')
await ch.close()
await rabbit.close()
}
main() Throughout this library I have tried to document important behavior where appropriate, and provide links to the official RabbitMQ docs for further context. The relevant notes for this library can be found here: node-rabbitmq-client/src/Channel.ts Lines 371 to 376 in 66c822d
node-rabbitmq-client/src/Channel.ts Lines 437 to 442 in 66c822d
Also consider using a higher level "Publisher" object for more safety. node-rabbitmq-client/src/Connection.ts Lines 190 to 196 in 66c822d
|
Hi! I am create a example with lib for study and practice, but i not found how to get the confirmation, i found only function
confirmSelection()
, how i get the confirmation on publisher ? I read the code and foundconfirm.select-ok
, but dont found how to use this methodThe text was updated successfully, but these errors were encountered: