How to differentiate publications w/o param & stream with DDP?

57 views Asked by At

Rocket Chat Understanding

As per my understanding on Rocket Chat platform(correct me if I am going in wrong directions), we(Android native - DDP) have 2 abstract class for subscription from AbstractDDPDocEventSubscriber with their own purpose to communicate with the server

AbstractStreamNotifyEventSubscriber - Communicate with server about streams

AbstractBaseSubscriber - Communicate with server about publications

As we can see that publication may have parameter as per the need of request but as of now the android app is not using in subscription which has param so we have protected final JSONArray getSubscriptionParams() on AbstractBaseSubscriber and then we can't override that method in their subclass.

Questions

  1. To call param based other subscription which is publications, does it better to make a change in the existing method to remove final or create a new base class for this for other methods?
  2. Rocket.Chat - Which one is the better for client-server two-way message sync publications vs streams to implement new stuff?
0

There are 0 answers