I have an Objective C provider that submits messages to an exchange on a remote RMQ
server.
I have a consumer listening on a queue bind to that exchange. I am using fanout.
when running the application from Xcode all is working well, the message is sent an the consumer receives it.
however, when running the application from the iPhone device the message does not show up at the end of the pipe.
Here is my send method:
- (void) send {
RMQConnection *conn = [[RMQConnection alloc] initWithUri:@"amqp://<user>:<pass>@<ip>:5672"
delegate:[RMQConnectionDelegateLogger new]];
//RMQConnection *conn = [[RMQConnection alloc] initWithDelegate:[RMQConnectionDelegateLogger new]];
[conn start];
id<RMQChannel> ch = [conn createChannel];
RMQExchange *x = [ch fanout:@"logs"];
NSString *mobilemsg = @"{\"test\" : \"test\" }";
[x publish:[mobilemsg dataUsingEncoding:NSUTF8StringEncoding]];
NSLog(@"Sent %@", mobilemsg);
[conn close];
}