EFEducationFirstMobile / librabbitmq-objc

Objective-C wrapper for librabbitmq-c
Other
9 stars 8 forks source link

Need some optimizations with modified AMQPConsumerThread #2

Closed phamquochoan closed 10 years ago

phamquochoan commented 10 years ago

Hi,

I've modified few lines of code in AMQPConsumerThread class. I moved some property in .m file into .h:

@interface AMQPConsumerThread : NSThread

@property (weak) id<AMQPConsumerThreadDelegate> delegate;
@property (strong) AMQPConnection *connection;
@property (strong) AMQPChannel *channel;
@property (strong) AMQPExchange *exchange;
@property (strong) AMQPQueue *queue;
@property (strong) AMQPConsumer *consumer;

@property (strong) NSString *topic;
@property (strong) NSString *exchangeKey;

// If YES, users have to manually alloc-init AMQPConsumerThread and set all these properties  in order to run correctly. 
///If NO, users could run initWithConfiguration... Default is NO.
@property (nonatomic, assign) BOOL manual;

Why am I doing this ? Because I want to modify some properties like: isPassive, isExclusive, isDurable, getsAutoDeleted ... which I could not when using initWithConfiguration...

However, I believe there are better ways to do this. My modified code looks silly because I'm not fully understand these lib, just a quick fix to fulfill what I want.

It's really great if this lib owners (Dmitry's group ?) spend some time to optimize it. Thanks.

dmakarenko commented 10 years ago

Hi Pham,

Thing is that we are planning to reimplement the wrapper as a separate OSS project. No more modifications related to API/design/structure are going to be done inside our fork of https://github.com/profmaad/librabbitmq-objc. The only changes we are planning to make will be about fixing bugs and iOS compatibility issues.