firebase / firebase/firebase-admin-node

[FR]Use multiplexing over HTTP2 in sendEachForMulticast method for batch push.

未关闭
#2,488 22 条评论 14 个 reaction 已指派 1 人 在 GitHub 查看

@jonathanedey 已经在做这个了。

开始于 2024年3月7日。

api: messaging type: feature request
主要语言
TypeScript
星标
1.7k
派生
419
平均合并
3 天 10 小时
30 天内合并 PR
16

描述

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
When I upgrade fcm to Http V1, the speed will become very slow when using sendEachForMulticast in firebase-admin:9.2.0.
Isn't HTTP/2 used in the SDK?

Describe the solution you'd like
Convert bulk send in SDK to HTTP/2.

Describe alternatives you've considered
Keep the original sendMulticast method.

Additional context
According to the database conditions, users (hundreds of thousands) who meet the sending conditions are selected for message push.
If the current sendEachForMulticast is used, it will be a nightmare.
The following code took 15 seconds to execute.

        List<String> registrationTokens = new ArrayList<>();
        for (int i = 1; i <= 500; i++) {
            registrationTokens.add(TOKEN + i);
        }

        MulticastMessage message = MulticastMessage.builder()
            .setNotification(Notification.builder().setTitle("test title").setBody("test body").build())
            .addAllTokens(registrationTokens).build();
        BatchResponse response = FirebaseMessaging.getInstance().sendEachForMulticast(message);
        System.out.println(response.getSuccessCount() + " messages were sent successfully");

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。