amqp-rs / lapin

AMQP client library in Rust, with a clean, futures based API
MIT License
1.01k stars 92 forks source link

Add with_type() message property function #412

Closed dnlsndr closed 1 week ago

dnlsndr commented 1 month ago

According to the AMQP 0.9.1 docs (https://www.rabbitmq.com/docs/publishers#message-properties), there's a message property called "type". I'm currently integrating against a 3rd party provider that requires this property for routing. It seems though, that I can not set up this property in the BasicProperties struct. Is it acceptable to implement this into the library? I can create a PR for that, if you wish.

dnlsndr commented 1 month ago

I just had another look at the source code, and noticed that there's a "kind" property. Is that equivalent to the "type" property?

dnlsndr commented 1 month ago

Ah yes, that is indeed the case :) closing

Keruspe commented 1 month ago

This should probably be better documented. That's because type is a reserved keyword iirc

dnlsndr commented 1 month ago

yeah, maybe it would still be possible to add a "with_type" alias function, as that does not collide with any keywords, and then just map it to the same logic, the "with_kind" function has?

Keruspe commented 1 week ago

Fixed in amq-protocol 7.2.1

Keruspe commented 3 days ago

It's now automatically pulled by lapin 2.4