41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
#ifndef REDIS_STREAM_MQ_H
|
||
#define REDIS_STREAM_MQ_H
|
||
|
||
/*
|
||
* lnk20260622 新增:Redis Streams 后端声明(运行时切换版)。
|
||
*
|
||
* 注意:
|
||
* 1. 本文件不定义 InitializeProducer / rocketmq_producer_send 等统一入口。
|
||
* 2. 只定义 RedisStream_xxx 后端函数,统一入口放在 SimpleProducer.cpp 中按配置转发。
|
||
* 3. 这样 RocketMQ 原源码和 RedisStream 源码可以同时编译进程序。
|
||
*/
|
||
|
||
//#include "mq_compat.h"
|
||
|
||
#include <string>
|
||
#include <vector>
|
||
|
||
struct Subscription;
|
||
|
||
void RedisStream_InitializeProducer();
|
||
void RedisStream_ShutdownAndDestroyProducer();
|
||
|
||
void RedisStream_producer_send(const std::string& body,
|
||
const std::string& topic,
|
||
const std::string& tags,
|
||
const std::string& keys);
|
||
|
||
void RedisStream_InitializeConsumer(const std::string& consumerName,
|
||
const std::string& nameServer,
|
||
const std::vector<Subscription>& subscriptions);
|
||
|
||
void RedisStream_ShutdownAndDestroyConsumer();
|
||
|
||
void RedisStream_consumer_receive(const std::string& consumerName,
|
||
const std::string& nameServer,
|
||
const std::vector<Subscription>& subscriptions);
|
||
|
||
bool RedisStream_should_process_after_start(const rocketmq::MQMessageExt& msg);
|
||
|
||
#endif // REDIS_STREAM_MQ_H
|