rabbitmq / rabbitmq-objc-client

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

async message subscribing #180

Closed gabibibi closed 3 years ago

gabibibi commented 3 years ago

Hi,

I am wondering if there is a way to make message consuming in async way? Sometimes in my app some operations are bloking and messages from AMQP don't want to come.

I will be grateful for response.

michaelklishin commented 3 years ago

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team).

We get at least a dozen of questions through various venues every single day, often light on details. At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because GitHub is a tool our team uses heavily nearly every day, the signal/noise ratio of issues is something we care about a lot.

Please post this to rabbitmq-users.

Thank you.

michaelklishin commented 3 years ago

Deliveries to consumers in RabbitMQ are always asynchronous, the server won't wait for any response. Dispatch operations on the client end use a GCD queue that you can configure (there are examples integration test suites). From there, you can hand over deliveries to be processed to another GCD queue if you want, or use any other approach. The only danger here is that concurrent dispatch and processing can result in deliveries being processed out of order. If your application does not depend on strict ordering, that's not an issue.

gabibibi commented 3 years ago

My problem is with older iPads. When UI is busy and take a lot of CPU I dont get any responses, and that causes in my case timeouts. Is any option to avoid that situation?