Skip to content

Releases: CopernicaMarketingSoftware/AMQP-CPP

AMQP-CPP 2.4.0

17 Nov 13:29
Compare
Choose a tag to compare
  • added libev implementation for TCP handler
  • fixed detection of connections closed by the server

AMQP-CPP 2.3.0

06 Nov 11:26
Compare
Choose a tag to compare

This release adds new features (TCP Connections, heartbeat) and contains some bug fixes.

  • Implemented TcpConnection, so that users of the library do not have to setup their own tcp connections
  • The server heartbeat is stored in Connection
  • Added Connection::waiting() method to find out if the connection object is waiting/expecting an answer from the rabbitmq server
  • Added "Address" class to parse "amqp://" urls
  • Extra Address constructor added
  • When building the address url, username and password should be split with a colon.
  • Use move semantics in Login class (small optimization)
  • Added "make pure" option, to make the library without tcp support
  • Fixed AMQP::Envelope copy constructor missing base class constructor call
  • Fix issue when tcp is closed.
  • Fixed Windows build
  • Code cleanup.

AMQP-CPP 2.2.3

30 Oct 14:17
Compare
Choose a tag to compare

Added the ability to statically link this library into other libraries by adding a static_fpic target.

AMQP-CPP 2.2.2

11 Sep 11:18
Compare
Choose a tag to compare

This release contains a single new feature, a method to check the amount of channels a certain connection currently has.

AMQP-CPP 2.2.1

06 Aug 10:23
Compare
Choose a tag to compare

This release contains bugfixes, new examples and documentation fixes:

  • When a deferred handler is in error state, registering a finalize callback should also cause it to be called immediately.
  • Removed some macros for FreeBSD.
  • Mac OS X uses a different parameter for setting the soname.
  • Added RabbitMQ tutorials.
  • Fixed a few incorrect signatures in docblocks.

AMQP-CPP 2.2.0

19 May 12:19
Compare
Choose a tag to compare

This release contains a number of bugfixes as well as some performance improvements

Fixed double call to Channel::onReady callback
In certain cases, the callback installed with onReady was called directly when being installed, as well as when the server acknowledged the channel now being open.

Messages are now moved into consumer callbacks
When consuming, received messages are now provided as an r-value reference instead of a const-reference, making it cheaper to move them somewhere for later use.

Message bodies can now be moved when publishing
The Channel::publish method now accepts an r-value std::string for the message body, avoiding an often unnecessary copy.

Workarounds for Windows compilers
Compilers under Windows (particularly Visual Studio) have trouble with some recent additions done in C++11. This release provides some workarounds so it can still be compiled there.

AMQP-CPP 2.1.4

05 Sep 10:49
Compare
Choose a tag to compare

This release contains a number of changes in the behavior of some classes and functions, and a new feature.

Fixed issues with Channel.get() and Channel.purgeQueue()
The Channel.get() and Channel.purgeQueue() methods always reported an error, even when nothing was wrong with the calls. This has been fixed.

Copy'ing of Connection and Channel objects has been disabled
The AMQP-CPP library no longer allows users to copy Connection or Channel objects. These two classes were never intended to be copyable, but technically it was still possible to do so (although this would probably end in either a crash or unexpected behavior). Now it is also technically impossible, and will be detected at compile time, because the copy constructors of the two classes have been deleted.

New Channel.get().onSize() method
When you call the Channel.get() function, the deferred object that is returned (and that you normally use to call the onReceived() or onMessage() methods on to install a callback for handling the message) now also has an onSize() method. This onSize() method will be called right before the message-callback is called, with the new number of messages in the queue.

channel.get("my-queue").onReceived([](const Message &message, uint64_t deliveryTag, bool redelivered) {

    // @todo process the message

}).onSize([](uint32_t messagecount) {

    std::cout << messagecount << " message remain in the queue" << std::endl;
});

Be aware that the queue-size callback function will be called before the message is received, but that the messagecount parameter holds the new queue size (without the message that is fetched from it).

Change order for onFinalize() calls
In some situations, the callback registered with onFinalize() was called before one of the other registered callbacks was called. This happened especially with the Channel.get() call. This has been fixed: the onFinalize() call will now always be called after the callbacks registered with onSize(), onMessage() and onEmpty() were invoked.

AMQP-CPP 2.1.3

20 Aug 13:07
Compare
Choose a tag to compare

This is mainly a bug fix release, and a couple of extra methods have been added to the Connection class.

New features
The Connection class now has methods "login()" and "vhost()" to retrieve the login and the vhost that were passed in when the object was constructed.

Bug fix: channels were not correctly queueing instructions
It turned out that when a Channel object was destructed before it had sent all instructions over the connection, the unsent instructions were lost. This was incorrect behavior of the Channel class - which is supposed to be a class that can be used in a local scope to group instructions. The following code was not working:

void myfunc(AMQP::Connection *connection)
{
    AMQP::Channel channel(connection);
    channel.declareQueue("my-queue");
    channel.bindQueue("my-exchange", "my-queue", "my-routing-key");
    channel.publish("my-exchange", "my-routing-key", "my-message");
    channel.get("my-queue").onSuccess([](const Message &message, uint64_t deliveryTag, bool redelivered) {
        // @todo deal with the message
    });
}

The above code above was not behaving the way you would expect: the queue was not bound, and no messages were published or received. This bug occured because the channel object falls out of scope and is destructed before all instructions are sent, and before the confirmations from RabbitMQ are received. This has now been fixed: all method calls on a channel object will now be sent to RabbitMQ, even when the channel object falls out of scope before the confirmations come back from RabbitMQ. It is thus now possible to use AMQP::Channel objects as local variables to group instructions.

AMQP-CPP 2.1.2

14 Aug 14:15
Compare
Choose a tag to compare

This release contains a number of bug fixes, and a couple of small new features:

  • There was a problem with methods being called on Channel or Connection objects that were already in an invalid state. In such a situation, an error was not always correctly reported to the Deferred object. This has been fixed..
  • Building the library on Apple systems was not possible because it depended on header files that are not available on such systems. This has been fixed.
  • New feature: the setQos() method now supports an extra parameter "global" to specify whether the quality-of-service applies to all consumers on the channel in total, or for each consumer individually.
  • Empty messages (message with no body) were ignored by the library. This has been fixed.
  • New feature: the Connection::parse() method can now also be called with a "Buffer" instance instead of a "const char *". This Buffer class is a base class with pure virtual methods that can be extended by the library user, and that can be more optimized than passing a contiguous buffer of bytes.

AMQP-CPP 2.1.1

04 Aug 13:10
Compare
Choose a tag to compare

This release fixes a possible crash in the Channel::get() method.