Cumulocity-IoT / cumulocity-microservice-templates

Collection of templates / examples to give the developer a starting point how common features can be solved by using Cumulocity Microservice SDK for Java. Developed by Global Competency Center IoT
Apache License 2.0
11 stars 5 forks source link

running microservice on cloud stop recieving measurement #25

Open vsingh-solenis opened 11 months ago

vsingh-solenis commented 11 months ago

I have used onNotification() Measurement subscription to listen for measurement .its working fine in local but when i deploy this microservice n cloud c8y its working for few hour and stop receiving measurement after that.

here is the Microservice error logs.

An error occurred for the measurement subscription

com.cumulocity.sdk.client.notification.ReconnectedSDKException: bayeux client reconnected clientId: 12esrya280bwq6n96g1nqc4keq3 at com.cumulocity.sdk.client.notification.SubscriberImpl.resubscribeAll(SubscriberImpl.java:192) at com.cumulocity.sdk.client.notification.SubscriberImpl.access$900(SubscriberImpl.java:39) at com.cumulocity.sdk.client.notification.SubscriberImpl$ReconnectOnSuccessfulConnected.rcvMeta(SubscriberImpl.java:273) at org.cometd.common.AbstractClientSession.extendRcv(AbstractClientSession.java:99) at org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:221) at org.cometd.client.BayeuxClient$7.postCreate(BayeuxClient.java:630) at org.cometd.client.BayeuxClient.changeState(BayeuxClient.java:971) at org.cometd.client.BayeuxClient.processHandshake(BayeuxClient.java:613) at org.cometd.client.BayeuxClient$HandshakeTransportListener.processMessage(BayeuxClient.java:1088) at org.cometd.client.BayeuxClient$PublishTransportListener.onMessages(BayeuxClient.java:1066) at com.cumulocity.sdk.client.notification.MessageExchange$ResponseConsumer.handleContent(MessageExchange.java:266) at com.cumulocity.sdk.client.notification.MessageExchange$ResponseConsumer.getMessagesFromResponse(MessageExchange.java:209) at com.cumulocity.sdk.client.notification.MessageExchange$ResponseConsumer.run(MessageExchange.java:156) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)