houseofcat / turbocookedrabbit

A user friendly RabbitMQ library written in Golang.
MIT License
107 stars 20 forks source link

how can i push message with priotity field? #14

Closed dfelici87 closed 3 years ago

dfelici87 commented 3 years ago

Hi,

How can I set a priority of message (https://www.rabbitmq.com/priority.html)?

Can you add "priotiry" field into Envelope struct of letter.go file?

Thanks

houseofcat commented 3 years ago

Looks like I overlooked this when I did v2. Thanks for pointing it out.

Added/Fixed with https://github.com/houseofcat/turbocookedrabbit/commit/c7a5e9365a4ea0247c36ccc9e597d81348c96915

Priority attribute is located in the Envelope struct. It is of type uint8, defaults to 0 which is standard for RabbitMQ/AMQP and with streadway/amqp.

dfelici87 commented 3 years ago

thanks