16#ifndef INCLUDED_RMQTESTMOCKS_MOCKCONSUMER
17#define INCLUDED_RMQTESTMOCKS_MOCKCONSUMER
19#include <rmqa_consumer.h>
20#include <rmqp_consumer.h>
21#include <rmqt_future.h>
22#include <rmqt_message.h>
24#include <gmock/gmock.h>
26#include <bsl_memory.h>
27#include <bsls_timeinterval.h>
29namespace BloombergLP {
30namespace rmqtestmocks {
41 bsl::shared_ptr<rmqa::Consumer> consumer();
54 MOCK_METHOD2(updateTopology,
56 const bsls::TimeInterval&));
Provide a RabbitMQ Async Consumer API.
Definition: rmqp_consumer.h:38
virtual rmqt::Future updateTopologyAsync(const rmqt::TopologyUpdate &topologyUpdate)=0
Updates topology.
virtual rmqt::Future drain()=0
Can only be called (successfully) once the Consumer has been cancelled, returns a future which resolv...
virtual rmqt::Future cancel()=0
Cancels the consumer, stops new messages flowing in.
virtual rmqt::Result cancelAndDrain(const bsls::TimeInterval &timeout)=0
Tells the broker to stop delivering messages to this consumer.
An async-style Future/Promise object.
Definition: rmqt_future.h:108
A result of an operation.
Definition: rmqt_result.h:37
Definition: rmqt_topologyupdate.h:33
Mocks rmqp::Consumer and/or rmqa::Consumer.
Definition: rmqtestmocks_mockconsumer.h:35