Skip to content

AMQP-CPP 4.0.0

Compare
Choose a tag to compare
@RafalGoslawski RafalGoslawski released this 15 Nov 11:05
· 325 commits to master since this release
bddceb7

Breaking changes:

AMQP-CPP 4.0.0 is not always compatible with previous versions. Especially some virtual methods in the ConnectionHandler and TcpHandler classes have been renamed or are called during a different stage in the connection lifetime. Check out the README file and the comments inside the connectionhandler.h and tcphandler.h files to find out if your application has to be changed. You should especially check the following:

ConnectionHandler::onConnected has been renamed to ConnectionHandler::onReady
TcpHandler::onConnected is now called sooner: when the TCP connection is established, instead of when the AMQP connection is ready for instructions.
The new method TcpHandler::onReady is called when the AMQP connection is ready to be used (this is the old behavior of TcpHandler::onConnected)
TcpHandler::onError is no longer the last method that is called (TcpHandler::onLost could be called and TcpHandler::onDetached will be called after the error too)
TcpHandler::onClosed is now called to indicate the graceful end of the AMQP protocol, and not the end of TCP connection.
TcpHandler::onLost is called when the TCP connection is lost or closed.
The new method TcpHandler::onDetached is a better alternative for cleanup code instead of TcpHandler::onClosed and/or TcpHandler::onError.

Changelog:

  • CMake tweaks to use library as a git submodule
  • fixed some typos
  • fix msvc compiler warnings
  • fixed MinGW compilation on Windows
  • added ConnectionHandler::onAttached() and ConnectionHandler::onDetached() methods
  • added onAttached() and onDetached() to the TcpHandler interface
  • the TcpConnection::close() method now supports an "immediate" parameter to skip the official amqp handshake for closing down
  • fixed typo and possible (but unlikely) crash in the tcp-resolver
  • refactored tcp handling, to solve various issues, like the one that lost connections do not trigger operations to fail
  • the state::abort() method is no longer needed
  • simplified the tcp and ssl states
  • add support for ConnectionHandler::onAttached() and ConnectionHandler::onDetached()
  • improved the tcp handler, added more methods to monitor whether a connection is connected, logged on and in an error state
  • fixed assigning the new state
  • removed unneeded comment
  • removed support for TcpConnection::flush() and removed internal TcpShutdown state
  • simplified and improved the close procedure
  • fixed compiler warning
  • added ConnectionHandler::onProperties and TcpConnectionHandler::onProperties
  • handle unlikely error when ssl-handshake could not be started
  • renamed ConnectionHandler::onConnected() to ConnectionHandler::onReady()
  • renamed onClosed to onLost to prevent confusion between TcpHandler::onClosed() and ConnectionHandler::onClosed()
  • update readme
  • added upgrade instructions
  • improved heartbeats documentation
  • disable timer in libboostasio because it cannot handle multiple connections, fixes #251
  • fixed the libev handler to be compatible with amqp-cpp 4.0, and we now also close the connection if the server stops sending heartbeats
  • fixed libev compiler errors
  • when tcp connection is lost, the pending operations are now reported with an error
  • fixed a couple of todos, make sure that onError() is always called
  • added connection::usable()
  • added channel::usable() to replace channel::connected()
  • added TcpConnection::closed()