Files
microser/redisstream/RedisStreamMQ.h

47 lines
1.6 KiB
C
Raw Normal View History

2026-06-24 16:37:32 +08:00
#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>
// lnk20260626 修改RedisStreamMQ.h 只需要知道 MQMessageExt 是一个类型即可
// 这里用前向声明,避免 RedisStreamMQ.h 直接依赖 RocketMQ 头文件
namespace rocketmq {
class MQMessageExt;
}
2026-06-24 16:37:32 +08:00
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