firebase / firebase/firebase-admin-java

Firestore listeners stop receive updates - Java

未关闭
#896 10 条评论 0 个 reaction 已指派 1 人 已被 @cherylEnkidu 认领 在 GitHub 查看
api: firestore
主要语言
Java
星标
620
派生
305
平均合并
3 小时 23 分钟
30 天内合并 PR
1

描述

Java Spring Boot 3.0.2
Firestore Listeners ( 7 )
Region FireStore - Sao paulo
Region Server - Sao Paulo AWS
Issue related : https://github.com/googleapis/google-cloud-java/issues/3514
https://github.com/googleapis/google-cloud-java/issues/13118

I have this kind of problem @schmidt-sebastian

i have 7 listeners, but always disconnecting some listeners and stop registering information in database. Im using Java.

What i have to do..to stop this behavior..?? because its intermitent situation.

I have to move to realtime database? or have some config extra to fix that? Because when i restart the server the listener back again..

Again, we are having a strange behavior of listeners. We have 7 listeners active and some time just 6..just 5.. and back to 7 ..but with this behavior we can put our plataform in production stage.

im using this

https://firebase.google.com/docs/admin/setup#java

implementation 'com.google.firebase:firebase-admin:9.2.0'

##########################


Resource resource = resourceLoader.getResource("classpath:prod-firebase.json");
String fileLines = new BufferedReader(new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8))
.lines()
.collect(Collectors.joining());
InputStream serviceAccount = new ByteArrayInputStream(fileLines.getBytes());

FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setDatabaseUrl("realtimedatabaseurl") //we are using realtimedatabase
.build();
FirebaseApp.initializeApp(options);

databaseReference = FirebaseDatabase.getInstance().getReference();

dbfirestore = FirestoreClient.getFirestore(); // firestore instance

![image](https://github.com/googleapis/google-cloud-java/assets/28266902/4ae30fbe-8e21-40c6-8082-2776b7d5de71)

![image](https://github.com/googleapis/java-firestore/assets/28266902/eacb7cd3-1f8e-4a61-aae9-0d781b10a9b7)

the problem is higher workload .. i check three times the workload and if we see the listener drop when the workload if high. the clock below each graph show us.. everytime have a peak drop listener.

now..i dont know what to do.. :(

Can someone help me?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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