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
We are using the latest version of the SimpleAmqpClient and we ran into problems when the connection of a consumer to the RabbitMQ server is (force) closed on the peer end.
Scenario
We start a consumer and have it consume messages by calling 'Channel::BasicConsumeMessage'. When there are no messages, the function just waits. If we now force close the connection on the RabbitMQ server, the exception ConnectionForcedException is thrown. This exception class has AmqpException as its very base class. However, during the construction of AmqpException another error (0xC0000005 access violation) occurs, because the function 'amqp_method_name' returns a NULL pointer. See the constructor of AmqpException below:
The value for 'reply_text' is: "connection exception: CONNECTION_FORCED - Closed via management plugin".
The value for both 'class_id' and 'method_id' is 0.
The text was updated successfully, but these errors were encountered:
This is a fix for Issue #12
Reworked the constructors and static Throw() method
to check the results of amqp_method_name before
trying to use it (returns NULL on error)
We are using the latest version of the SimpleAmqpClient and we ran into problems when the connection of a consumer to the RabbitMQ server is (force) closed on the peer end.
Scenario
We start a consumer and have it consume messages by calling 'Channel::BasicConsumeMessage'. When there are no messages, the function just waits. If we now force close the connection on the RabbitMQ server, the exception ConnectionForcedException is thrown. This exception class has AmqpException as its very base class. However, during the construction of AmqpException another error (0xC0000005 access violation) occurs, because the function 'amqp_method_name' returns a NULL pointer. See the constructor of AmqpException below:
AmqpException::AmqpException(const std::string& reply_text, boost::uint16_t class_id, boost::uint16_t method_id) throw() :
std::runtime_error(std::string(amqp_method_name((class_id << 16) | method_id)).append(" caused: ").append(reply_text)),
m_reply_text(reply_text),
m_class_id(class_id),
m_method_id(method_id)
{}
The value for 'reply_text' is: "connection exception: CONNECTION_FORCED - Closed via management plugin".
The value for both 'class_id' and 'method_id' is 0.
The text was updated successfully, but these errors were encountered: