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: 1010
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: 1010
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: 1010
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: 518

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1