You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running this code on cloudamqp with configuration:
Cluster: cheerful-squirrel (change)
RabbitMQ 3.5.7, Erlang 18.2
The program is able to consume up to 30 messages and I see that the queue disappears in the RabbitMQ dashboard, which probably means the connection is lost. After that the consumer hangs. When I set auto_delete to false in queue_declare I observe that Ready messages count grows while consumer hangs.
Here's the code, it mostly follows the provided example:
letmut session:Session = matchSession::open_url(url){Ok(s) => s,Err(e) => panic!("Session::open_url: {}", e),};letmut channel:Channel = match session.open_channel(1){Ok(s) => s,Err(e) => panic!("Session.open_channel: {}", e),};
channel.exchange_declare(exchange,"fanout",false,// passivefalse,// durablefalse,// auto_deletefalse,// internalfalse,// nowait - hangs when set to trueTable::new()).err().map(|e| panic!("Channel.exchange_declare: {}", e));
channel.queue_declare(queue,false,// passivefalse,// durabletrue,// exclusivetrue,// auto_deletefalse,// nowait - hangs when set to trueTable::new()).err().map(|e| panic!("Channel.queue_declare: {}", e));
channel.queue_bind(queue,
exchange,"",false,// nowait - hangs when set to trueTable::new()).err().map(|e| panic!("Channel.queue_bind: {}", e));let consumer = Consumer{cnt:0};let consumer_name = match channel.basic_consume(consumer,
queue,"",false,// no_localfalse,// no_acktrue,// exlusivefalse,// nowait - hangs when set to trueTable::new()){Ok(s) => s,Err(e) => panic!("Channel.basic_consume: {}", e),};println!("{} Starting consumer: {}", date_str(), consumer_name);
channel.start_consuming();
channel.close(200,"Bye").err().map(|e| panic!("Channel.close: {}", e));
session.close(200,"Good Bye");
Can you run the consumer with the logger initialized: env_logger::init().unwrap(); and RUST_LOG=debug. This will give you some idea of what's going on.
I'm running this code on cloudamqp with configuration:
Cluster: cheerful-squirrel (change)
RabbitMQ 3.5.7, Erlang 18.2
The program is able to consume up to 30 messages and I see that the queue disappears in the RabbitMQ dashboard, which probably means the connection is lost. After that the consumer hangs. When I set
auto_delete
to false inqueue_declare
I observe that Ready messages count grows while consumer hangs.Here's the code, it mostly follows the provided example:
Consumer:
The text was updated successfully, but these errors were encountered: