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

Subscription - keepAliveInterval is reached #43

Open
rureverek opened this issue May 16, 2024 · 0 comments
Open

Subscription - keepAliveInterval is reached #43

rureverek opened this issue May 16, 2024 · 0 comments

Comments

@rureverek
Copy link

I have small issue when working with Subscription feature. I realised that after keepAliveinterval specified in SubscriptionProperties, my Subscription gets flooded by notifications even that data didn't changed...

Is it possible to turn off notifications (publishCallback()) when keepAliveinterval is reached?

I'm using the code similar to one i tutorial:

  flatbuffers::FlatBufferBuilder builder;
  auto dataChange = comm::datalayer::CreateSampling(builder, 2500);
  auto rule = comm::datalayer::CreateProperty(builder, comm::datalayer::Properties::Properties_Sampling, dataChange.Union());
  auto rules = builder.CreateVector(&rule, 1);
  auto idTmp = builder.CreateString(id);
  builder.Finish(comm::datalayer::CreateSubscriptionProperties(builder, idTmp, 60000, 1000, rules));
  comm::datalayer::Variant subscriptionProperties;
  subscriptionProperties.shareFlatbuffers(builder);

  auto result = m_datalayerClient->createSubscriptionSync(subscriptionProperties, publishCallback());

I would like to have notification only when data is changed, and in the case keepAliveInterval is reached I don't want to have any publishCallback().

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

No branches or pull requests

1 participant