Describe the bug
Map subscription is not notified if initial value is added immediately after subscribing.
To Reproduce
@Route("")
@Push
public class InitialSubscribe extends Div {
public InitialSubscribe() {
SystemUserInfo user = SystemUserInfo.getInstance();
CollaborationEngine.getInstance().openTopicConnection(this, "topic", user, connection -> {
CollaborationMap map = connection.getNamedMap("map");
map.subscribe(changeEvent -> add(new Paragraph("Value: " + changeEvent.getValue(String.class))));
map.put("key", "value");
return null;
});
}
}
Steps to reproduce the behavior:
Start the application and open the view
Observe that no Value: value text is shown
Open another tab, and observe that the text is shown in this case
Expected behavior
Expected that the subscriber is always triggered when the value is changed. This is the case if the order is changed so that put is done before subscribe.
Describe the bug Map subscription is not notified if initial value is added immediately after subscribing.
To Reproduce
Steps to reproduce the behavior:
Value: value
text is shownExpected behavior Expected that the subscriber is always triggered when the value is changed. This is the case if the order is changed so that
put
is done beforesubscribe
.Versions
¯\_(ツ)_/¯
¯\_(ツ)_/¯
¯\_(ツ)_/¯