Skip to content

Commit bbce300

Browse files
release 3.00.2.2
1 parent fa12076 commit bbce300

File tree

4 files changed

+72
-37
lines changed

4 files changed

+72
-37
lines changed

CMakeLists.txt

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,29 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
5151
PRIVATE ${AERON_LIBRARY}
5252
)
5353

54-
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
54+
if (WIN32)
5555
target_compile_definitions(${CMAKE_PROJECT_NAME}
5656
PRIVATE WINDOWS NOMINMAX _DDBAPIDLL
5757
)
58+
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ws2_32)
59+
if (MINGW)
60+
target_compile_definitions(${CMAKE_PROJECT_NAME}
61+
PRIVATE _WIN32_WINNT=0x0600
62+
)
63+
endif()
64+
else()
65+
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE pthread rt uuid)
66+
endif()
67+
68+
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
5869
# C4251: Class member of an exported class is not marked dllexport.
5970
# This is triggered by std::string but we cannot modify STL.
6071
# C4100: Parameter is unused. We should fix this later.
6172
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE /W3 /WX /MP /wd4251 /wd4100)
62-
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ws2_32)
63-
else ()
64-
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Werror)
65-
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE pthread rt uuid)
73+
else()
74+
# overloaded-virtual: Derived class hides base class virtual functions
75+
# This is triggered by derived classes of Constant and we will fix this later
76+
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Werror -Wno-overloaded-virtual)
6677
endif()
6778

6879
if (USE_CXX11_ABI AND EXISTS "${PROJECT_SOURCE_DIR}/thirdparty/googletest/CMakeLists.txt")

include/Streaming.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class EXPORT_DECL StreamingClient {
4646
int64_t offset, bool resubscribe, const VectorSP &filter,
4747
bool msgAsTable, bool allowExists, int batchSize,
4848
std::string userName, std::string password,
49-
const StreamDeserializerSP &blobDeserializer, const std::vector<std::string>& backupSites, bool isEvent, int resubTimeout, bool subOnce, bool convertMsgRowData);
49+
const StreamDeserializerSP &blobDeserializer, const std::vector<std::string>& backupSites, bool isEvent, int resubscribeInterval, bool subOnce, bool convertMsgRowData, int resubscribeTimeout);
5050
void unsubscribeInternal(std::string host, int port, std::string tableName, std::string actionName = DEFAULT_ACTION_NAME);
5151

5252
protected:
@@ -58,7 +58,7 @@ class EXPORT_DECL EventClient : public StreamingClient{
5858
public:
5959
EventClient(const std::vector<EventSchema>& eventSchema, const std::vector<std::string>& eventTimeFields, const std::vector<std::string>& commonFields);
6060
ThreadSP subscribe(const std::string& host, int port, const EventMessageHandler &handler, const std::string& tableName, const std::string& actionName = DEFAULT_ACTION_NAME, int64_t offset = -1,
61-
bool resub = true, const std::string& userName="", const std::string& password="");
61+
bool resub = true, const std::string& userName="", const std::string& password="", int resubscribeTimeout=0);
6262
void unsubscribe(const std::string& host, int port, const std::string& tableName, const std::string& actionName = DEFAULT_ACTION_NAME);
6363

6464
private:
@@ -76,13 +76,13 @@ class EXPORT_DECL ThreadedClient : public StreamingClient {
7676
std::string actionName = DEFAULT_ACTION_NAME, int64_t offset = -1, bool resub = true,
7777
const VectorSP &filter = nullptr, bool msgAsTable = false, bool allowExists = false,
7878
std::string userName="", std::string password="",
79-
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(),int resubTimeout = 100, bool subOnce = false);
79+
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(),int resubscribeInterval = 100, bool subOnce = false, int resubscribeTimeout = 0);
8080
ThreadSP subscribe(std::string host, int port, const MessageBatchHandler &handler, std::string tableName,
8181
std::string actionName = DEFAULT_ACTION_NAME, int64_t offset = -1, bool resub = true,
8282
const VectorSP &filter = nullptr, bool allowExists = false, int batchSize = 1,
8383
double throttle = 1,bool msgAsTable = false,
8484
std::string userName = "", std::string password = "",
85-
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(),int resubTimeout = 100,bool subOnce = false);
85+
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(),int resubscribeInterval = 100,bool subOnce = false, int resubscribeTimeout = 0);
8686
size_t getQueueDepth(const ThreadSP &thread);
8787
void unsubscribe(std::string host, int port, std::string tableName, std::string actionName = DEFAULT_ACTION_NAME);
8888
};
@@ -97,7 +97,7 @@ class EXPORT_DECL ThreadPooledClient : public StreamingClient {
9797
std::string actionName, int64_t offset = -1, bool resub = true,
9898
const VectorSP &filter = nullptr, bool msgAsTable = false, bool allowExists = false,
9999
std::string userName = "", std::string password = "",
100-
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(), int resubTimeout = 100, bool subOnce = false);
100+
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(), int resubscribeInterval = 100, bool subOnce = false, int resubscribeTimeout = 0);
101101
void unsubscribe(std::string host, int port, std::string tableName, std::string actionName = DEFAULT_ACTION_NAME);
102102
size_t getQueueDepth(const ThreadSP &thread);
103103

@@ -115,7 +115,7 @@ class EXPORT_DECL PollingClient : public StreamingClient {
115115
int64_t offset = -1, bool resub = true, const VectorSP &filter = nullptr,
116116
bool msgAsTable = false, bool allowExists = false,
117117
std::string userName="", std::string password="",
118-
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(), int resubTimeout = 100, bool subOnce = false);
118+
const StreamDeserializerSP &blobDeserializer = nullptr, const std::vector<std::string>& backupSites = std::vector<std::string>(), int resubscribeInterval = 100, bool subOnce = false, int resubscribeTimeout = 0);
119119
void unsubscribe(std::string host, int port, std::string tableName, std::string actionName = DEFAULT_ACTION_NAME);
120120
};
121121

0 commit comments

Comments
 (0)