Is the broker running on the host and port you're connecting to?

Have you tried contacting the author of this library?

On 25 May 2013, at 09:55, shivang vyas <shivangvyas2...@gmail.com> wrote:

> using this library for ios rabbitmq client integration: 
> https://github.com/bimawa/librabbitmq-objC
> 
> here is an iOS - obj C code: 
> 
> }
> 
> -(void)establish{
> 
>     
> 
>     AMQPConnection *connection = [[AMQPConnection alloc] init];
> 
>     NSError *error, *error1,*error2,*error3;
> 
>     [connection connectToHost:<hostname> onPort:<portno> error:&error] ? 
> NSLog(@"Connected to host"):NSLog(@"not connected to host");
> 
>     
> 
>     [connection loginAsUser:@"guest" withPasswort:@"guest"
> 
>                     onVHost:@"/" error:&error1];
> 
>     
> 
>     AMQPChannel *channel = [connection openChannel];
> 
>     AMQPExchange * exchange = [[AMQPExchange alloc] 
> initExchangeWithName:<exchangename>
> 
>                                                                
> onChannel:channel];
> 
>     
> 
>     AMQPQueue *queue = [[AMQPQueue alloc] initWithName:@"my_queue" 
> onChannel:channel];
> 
>     [queue bindToExchange:exchange withKey:@"99999" error:&error3];
> 
>     
> 
>     AMQPConsumer *consumer = [[AMQPConsumer alloc] initForQueue:queue 
> onChannel:&channel
> 
>                                             useAcknowledgements:YES
> 
>                                                     isExclusive:NO
> 
>                                            receiveLocalMessages:NO
> 
>                                                           error:&error2
> 
>                                                        deepLoop:5];
> 
>     AMQPConsumerThread *consumerThread = [[AMQPConsumerThread alloc] 
> initWithConsumer:consumer delegate:(id)self nameThread:@"shivng_thread"];
> 
>     [consumerThread start];
> 
>     
> 
>     
> 
>     
> 
> }
> 
> 
> 
> -(void)amqpConsumerThreadReceivedNewMessage:(AMQPMessage*)theMessage{
> 
>     NSLog(@"message = %@", theMessage);
> 
>     NSLog(@"message.body = %@", theMessage.body);
> 
> }
> 
> -(void)amqpConsumerThreadLoseConnection{
> 
>     NSLog(@"Consumer thread lost connection");
> 
> }
> 
> application just got hanged while calling : 
> 
>  [connection loginAsUser:@"guest" withPasswort:@"guest"
> 
>                     onVHost:@"/" error:&error1];
> 
> 
> 
> the reason is, function: 
> 
> result = recv(state->sockfd, 
> state->sock_inbound_buffer.bytes,state->sock_inbound_buffer.len, 0);
> 
> doesn't return back, just waiting waiting......
> 
> app waiting for executing next other statements after the above line...
> 
> 
> 
> 
> 
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc...@lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-- 
You received this message because you are subscribed to the Google Groups 
"rabbitmq-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rabbitmq-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to rabbitmq-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/rabbitmq-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to