rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 84 forks source link

RMQBasicConsume can't add arguments to a consumer #106

Closed timhonders closed 7 years ago

timhonders commented 7 years ago

It seems it's not possible to set the arguments to the RMQBasicConsume.

In the RMQMethods+Convenience.m the implementation RMQBasicConsume initWithQueue sets the arguments with a new empty RMQTable

https://github.com/rabbitmq/rabbitmq-objc-client/blob/121a96b20618f58c431eb898ed983d283b9f046b/RMQClient/RMQMethods%2BConvenience.m

michaelklishin commented 7 years ago

Yes. It's a rarely used feature so we left it out of the original implementation. Thanks for pointing it out.

timhonders commented 7 years ago

We want to use it for x-priority on the consumer, so a mobile phone with a bad connection will receive messages with a new connection when the old one isn't closed by the server.

michaelklishin commented 7 years ago

@timhonders that I'd recommend using a lower heartbeat timeout value instead, e.g. 6-8 seconds.

michaelklishin commented 7 years ago

@timhonders also, if it's a matter of adding a single convenience method, feel free to look into a pull request. Community contributions have a pretty high priority for our team :)

timhonders commented 7 years ago

Ok i wil give it a try :)

timhonders commented 7 years ago

Added a pull request

https://github.com/rabbitmq/rabbitmq-objc-client/pull/107

michaelklishin commented 7 years ago

@timhonders it's in, thank you!