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
First of all, thank for your work. We use rabbitmq-c for the last few month and, its works like a charm :)
We just have one issue, in your applicaion we have a AMQP connection, and every 10 seconds we use it to send messages (without reopening the connection). Everyting works fine with this, but when we have a network failure (ie the connection to the remote service failed ex: network cable unlink), the connection is close but it hang with this call stack :
#1 0x0000007f997bc708 in recv_with_timeout () from /usr/lib/librabbitmq.so.4 #2 0x0000007f997bd16c in wait_frame_inner () from /usr/lib/librabbitmq.so.4 #3 0x0000007f997bd8cc in simple_rpc_inner () from /usr/lib/librabbitmq.so.4 #4 0x0000007f997bdbbc in amqp_simple_rpc () from /usr/lib/librabbitmq.so.4 #5 0x0000007f997b51b4 in amqp_channel_close () from /usr/lib/librabbitmq.so.4 #6 0x0000007f99db99a0 in ace_amqp_client_close_connection () from /tmp/run_service/build/ace_common/libace_common.so
Hi,
First of all, thank for your work. We use rabbitmq-c for the last few month and, its works like a charm :)
We just have one issue, in your applicaion we have a AMQP connection, and every 10 seconds we use it to send messages (without reopening the connection). Everyting works fine with this, but when we have a network failure (ie the connection to the remote service failed ex: network cable unlink), the connection is close but it hang with this call stack :
#1 0x0000007f997bc708 in recv_with_timeout () from /usr/lib/librabbitmq.so.4
#2 0x0000007f997bd16c in wait_frame_inner () from /usr/lib/librabbitmq.so.4
#3 0x0000007f997bd8cc in simple_rpc_inner () from /usr/lib/librabbitmq.so.4
#4 0x0000007f997bdbbc in amqp_simple_rpc () from /usr/lib/librabbitmq.so.4
#5 0x0000007f997b51b4 in amqp_channel_close () from /usr/lib/librabbitmq.so.4
#6 0x0000007f99db99a0 in ace_amqp_client_close_connection () from /tmp/run_service/build/ace_common/libace_common.so
Ths code that we use :
void
ace_amqp_client_close_connection(AceAMQPClient* self){
g_rec_mutex_lock(&self->mConn);
if(self->conn){
amqp_channel_close(self->conn, 1, AMQP_REPLY_SUCCESS);
amqp_connection_close(self->conn, AMQP_REPLY_SUCCESS);
amqp_destroy_connection(self->conn);
self->conn = NULL;
}
g_rec_mutex_unlock(&self->mConn);
}
Opening of the connection :
gboolean
ace_amqp_client_open_connection(AceAMQPClient* self){
gboolean result = FALSE;
ace_amqp_client_close_connection(self);
g_rec_mutex_lock(&self->mConn);
if(self->conn == NULL){
amqp_socket_t *socket = NULL;
self->conn = amqp_new_connection();
if (self->ssl) {
socket = amqp_ssl_socket_new(self->conn);
amqp_ssl_socket_set_verify_peer(socket, 0);
amqp_ssl_socket_set_verify_hostname(socket, 0);
}
g_rec_mutex_unlock(&self->mConn);
return result;
}
Do you have any feedback on this issue ?
Regards,
Adrien
The text was updated successfully, but these errors were encountered: