Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Subscription and KeepSubscriptions
September 29, 2015
15:02, EEST
Avatar
Xavier
Member
Members
Forum Posts: 43
Member Since:
March 26, 2014
sp_UserOfflineSmall Offline

Hello,

I just would like to know if there is an easy way to disconnect from a server and reconnect manually later without having all subscriptions recreated ?

I set autoReconnect at false and keepSubscriptions at false.

But when after a disconnect I call connect the subscriptions are automatically recreated. I think this is a nice feature is most use case but I can’t seem to find a way to disable it.

Thanks

September 29, 2015
15:07, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Try KeepSubscriptions = true – then the server should keep the subscriptions when you disconnect and they should be reused after the next connect, if they haven’t timed out – ensure the LifeTimeCount is big enough.

September 29, 2015
15:23, EEST
Avatar
Xavier
Member
Members
Forum Posts: 43
Member Since:
March 26, 2014
sp_UserOfflineSmall Offline

Ok sorry my question is not clear enough. I would like my client to “forget” all subscriptions when I reconnect like when I create a new client.

September 30, 2015
9:07, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Ah, sorry for misreading. I did not imagine you want it that way, so understood it like I wanted 🙂

Reconnect is a “special connection” -or in fact, it is just a re-establishment of a temporary communication issue. The idea is that you lose no information during it, so also the subscriptions are kept by default.

But if you wish that the subscriptions are recreated, you need to work on the KeepAliveCount and LifieTimeCount to keep them small enough so that the subscription will timeout in the client and/or server. Only in that case it will be recreated.

Or can you explain why it would be a useful feature to make them always recreated? It might be possible to add an option for that – although it requires removing the old subscription and creating a new one in the server, which feels like extra “hassle” in normal circumstances.

September 30, 2015
14:01, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Sorry, I think I still misunderstood your need ;(

So, you want to be able to disconnect, remove all subscriptions and then call connect without creating the subscriptions.

This would require you to remove the subscriptions from UaClient after disconnect and keeping them somewhere aside, until you want to connect them again – in which point you would add them back to the UaClient.

Is this what you are after?

October 5, 2015
18:28, EEST
Avatar
Xavier
Member
Members
Forum Posts: 43
Member Since:
March 26, 2014
sp_UserOfflineSmall Offline

Yes that’s it and what you are suggesting is OK for me, thanks.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 738

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6451

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1