diff --git a/include/client/taos.h b/include/client/taos.h index 5f7cd12963107f9d21086becd87dc5d7b0b591a2..6549821953e0cce9bcff480a07b081a6c7766a83 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -225,6 +225,7 @@ DLL_EXPORT tmq_t* taos_consumer_new(void* conn, tmq_conf_t* conf, char* errstr, DLL_EXPORT TAOS_RES* tmq_subscribe(tmq_t* tmq, tmq_list_t* topic_list); DLL_EXPORT tmq_message_t* tmq_consumer_poll(tmq_t* tmq, int64_t blocking_time); +DLL_EXPORT tmq_resp_err_t* tmq_commit(tmq_t* tmq, tmq_topic_vgroup_list_t* tmq_topic_vgroup_list, int32_t async); #ifdef __cplusplus } diff --git a/include/common/common.h b/include/common/common.h index b1231be5aed03cc645416b1e2933fe64e8d7a7fd..bbde65b48fa8eb5ae0d1f9cda27a88cfb44373d6 100644 --- a/include/common/common.h +++ b/include/common/common.h @@ -38,6 +38,10 @@ // int16_t bytes; //} SSchema; +#define TMQ_REQ_TYPE_COMMIT_ONLY 0 +#define TMQ_REQ_TYPE_CONSUME_ONLY 1 +#define TMQ_REQ_TYPE_CONSUME_AND_COMMIT 2 + typedef struct { uint32_t numOfTables; SArray *pGroupList;