Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.6.2024.1212 版本 阿里云 5.x Consumer无法监听到消息 #92

Open
qingshanruwohuai opened this issue Jan 17, 2025 · 1 comment

Comments

@qingshanruwohuai
Copy link

_consumer.OnConsume = OnConsume;
bool success =  _consumer.Start();
    private static Boolean OnConsume(NewLife.RocketMQ.Protocol.MessageQueue q, NewLife.RocketMQ.Protocol.MessageExt[] ms)
    {
        LogRocket(String.Format("[{0}@{1}]收到消息[{2}]", q.BrokerName, q.QueueId, ms.Length));

        foreach (var item in ms.ToList())
        {
            LogRocket(String.Format($"消息:主键【{0}】 Topic 【{1}】,产生时间【{2}】,内容【{3}】",
               item.Keys, item.Topic, item.BornTimestamp.ToDateTime().ToFullString(), item.Body.ToString()));
        }

        return true;
    }

大佬,阿里云RocketMQ 5.x 在消费消息时,这个监听没收到消息。配置和生产差不多,生产可以成功。

@nnhy
Copy link
Member

nnhy commented Feb 1, 2025

大概两个月前,购买阿里云RocketMQ测试,生产和消费都通过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants