[rabbitmq-discuss] Messages disappearing
Nick Pateman
nick.pateman at certivox.com
Thu Nov 17 15:21:34 GMT 2011
Just to clarify my connection code...
queuename = testing
conn = amqp_new_connection();
die_on_error(sockfd = amqp_open_socket(hostname, port),
"Opening socket");
amqp_set_sockfd(conn, sockfd);
die_on_amqp_error(amqp_login(conn, "/", 0, 131072, 0, AMQP_SASL_METHOD_PLAIN, "guest", "guest"),
"Logging in");
amqp_channel_open(conn, 1);
die_on_amqp_error(amqp_get_rpc_reply(conn),
"Opening channel");
amqp_basic_consume(conn, 1, queuename, amqp_empty_bytes, 0, 1, 0, amqp_empty_table);
die_on_amqp_error(amqp_get_rpc_reply(conn),
"Consuming");
//Messages are being sent here
//****************************************************
// TODO: Free any allocated resources before exiting
//****************************************************
die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS),
"Closing channel");
die_on_amqp_error(amqp_connection_close(conn, AMQP_REPLY_SUCCESS),
"Closing connection");
die_on_error(amqp_destroy_connection(conn),
"Ending connection");
From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Nick Pateman
Sent: 17 November 2011 15:13
To: Alvaro Videla
Cc: rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [rabbitmq-discuss] Messages disappearing
Hi Alvaro,
I've tried removing the binding code as suggested and the error does not appear, so the message appears to be going somewhere but it's doing the same as it was prior to changing the exchange to an empty string.
/*printf("Binding RabbitMQ queue\r\n");
amqp_queue_bind(conn, 1, queuename, amqp_cstring_bytes(exchange), amqp_cstring_bytes(bindingkey),
amqp_empty_table);
The above line has now gone which removed the previous error.
Nick.
From: Alvaro Videla [mailto:videlalvaro at gmail.com]
Sent: 17 November 2011 12:37
To: Nick Pateman
Cc: Simon MacMullen; rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [rabbitmq-discuss] Messages disappearing
Hi,
What I tried to convey is that in your code you can't say queue_bind('my_queue', ''); where '' is the anon exchange.
I thought the error "operation not permitted on the default exchange" you mentioned in your past email could be related to that.
-Alvaro
On Thu, Nov 17, 2011 at 12:44 PM, Nick Pateman <nick.pateman at certivox.com<mailto:nick.pateman at certivox.com>> wrote:
Hi Alvaro,
Sorry for the delayed reply. What do you mean exactly? I created the queue through the web interface as opposed to being created in code so it's setup at it's default values.
Nick.
From: Alvaro Videla [mailto:videlalvaro at gmail.com<mailto:videlalvaro at gmail.com>]
Sent: 16 November 2011 17:19
To: Nick Pateman
Cc: Simon MacMullen; rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>
Subject: Re: [rabbitmq-discuss] Messages disappearing
You can't bind queues to the default exchange. Your new queue should be automatically bound to it.
On Wed, Nov 16, 2011 at 6:11 PM, Nick Pateman <nick.pateman at certivox.com<mailto:nick.pateman at certivox.com>> wrote:
Aahaa, I had no idea to be honest. I've changed it to "" and have got an error out of it so that's one step closer...
"operation not permitted on the default exchange"
-----Original Message-----
From: rabbitmq-discuss-bounces at lists.rabbitmq.com<mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com> [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com<mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com>] On Behalf Of Simon MacMullen
Sent: 16 November 2011 17:07
To: rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>
Subject: Re: [rabbitmq-discuss] Messages disappearing
On 16/11/11 17:02, Nick Pateman wrote:
> amqp_cstring_bytes("amq.direct"),
> amqp_cstring_bytes(queue_name),
So have you set up a binding from the exchange "amq.direct" to your queue?
"amq.direct" is not the default exchange that auto-routes to queues - you should use the name "" for that.
Otherwise your messages will get to the exchange and then be dropped as unroutable. If you're looking at the exchanges tab in mgmt you would see your message rate there, but nothing in the queues tab - is that what you're seeing?
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111117/dc7669eb/attachment.htm>
More information about the rabbitmq-discuss
mailing list