Previously if multiple attempts to call consume were made, then
QAmqpQueue would send a frame for each of them leading to multiple
consumer tags and general confusion. This guards from calling
consume multiple times.
This gives an example of how you can use QMetaObject::invokeMethod to
call a QAmqpExchange from another thread. Also, moved the qRegisterMetaType
for QAmqpMessage::PropertyHash to the ctor of QAmqpClientPrivate
In cases where exchanges and queues are added and deleted during
an extended use of a QAmqpClient, the client should internally cleanup
the frame handlers registered for those objects. This patch does that
as well as providing two test cases verifying this behavior for both
QAmqpQueue and QAmqpExchange.
This adds preliminary support for SSL connections to a RabbitMQ
server. Instead of providing two clients (QAmqpClient/QAmqpSslClient),
the SSL support was directly rolled into QAmqpClient itself, providing
signals/slots to deal with errors (sslErrors/ignoreSslErrors), and
the ability to assign a QSslConfiguration. Travis testing for ssl
support is currently disabled, pending a solution to a travis
limitation for starting ssl listeners
RabbitMQ supports publish confirms (Publisher Acknowledgements) on
a given channel. This enables the user to toggle this functionality
and ensure that published messages are in fact published.
This is a very small library, so there is no real pressing need for
a library namespace. Further, the namespacing actually makes it rather
difficult to work with in some cases. Opting for a more "Qt" style
class naming scheme, using the QAmqp class prefix
amqp_<filename> is used in at least two other C/C++ projects related
to amqp, so this commit changes all our source to use a qamqp header.
This avoids potential clashes, and is more in line with Qt style
QAMQP::Frame used to be public API mostly for MessageProperties. There
is no longer a need to keep this API public, as it should all be wrapped
with the cleaner Message/Queue/Exchange/Client API set
Though it's not necessarily recommended (per spec), Channels can be
shared by multiple Exchanges and Queues. I've added a test here showing
that's possible with QAMQP
Fleshed out the previously unimplemented flow control frame handling,
added an auto test for it. Also refactored out the stateChanged ChannelPrivate
method, if we need proper state support in the future it will be added with
a better implementation
existing tests have been immediately declaring queues and exchanges, and
not testing non-delayed declaration (queue/exchange is OPEN when declaration
occurs). these new tests cover this case
There are two distinctive type sets in AMQP, the basic AMQP types
and then the superset of Table value types. This commit attempts to
make that distinction more clear by the addition of a Table class.
Basically, AMQP value type read/write support is left in Frame for the
time being, while table value field read/write support has been moved
to the Table class. Also, a number of type differences exist between
the spec and rabbitmq's binary parser (noted in the errata page) which
were not previously honored.
the qos autotest required initially for us to wait for messages to
be added to the queue before running the test, and this was flakey
at best. these changes make it much more dependable
MessageProperties is currently defined in Frame::Content, which makes it
cumbersome to use when working directly with a Message itself. I attempted
to make this easier by using typedefs, but it's become pretty obvious that
it belongs in the Message class itself.