Ignition 8.1.17 - after upgrading from 8.1.16, pages message sent doesn't trigger perspective message handler?

Hi @PGriffith,

I’ve upgraded an application from Ignition 8.1.16 to Ignition 8.1.17

I have a module that send message to perspective pages.
All works fine in 8.1.16, but after upgrading in 8.1.17, the message are not sent or received in the event bus.

Does anything change in the way to send page’s message ?

The code used by the module to send message:

    public void sendCallbackMessage(String strSessionId,String pageId,String sessionName,Dataset data) {
        try {
            UUID sessionId = UUID.fromString(strSessionId);
            perspectiveContext.getSessionMonitor().findSession(sessionId).ifPresent(session -> {

                Optional<PageModel> pageModel = session.findPage(pageId);
                if (pageModel.isPresent()){

                    PyDictionary payloadMap = new PyDictionary();
                    QualifiedValue value = new BasicQualifiedValue(data);
                    payloadMap.put("data", value);

                    UserScopeMessageEvent message = new UserScopeMessageEvent(sessionName, payloadMap);

                    logger.debug("sendCallbackMessage() send to sessionName={} - sessionId={} - pageId={} - data={}",

                    session.queue().submit(() -> pageModel.get().getPageEventBus().post(message));

                } else {
                    logger.error("sendCallbackMessage() - sessionId={} - pageId={} not found !",
        } catch (Exception e) {
            logger.error("sendCallbackMessage() - Exception : {}",e);

According to gateway and browser logs, session id and page id are OK,
nevertheless the message handler that is no more triggered since upgrading in 8.1.17:

Perspective page message handler:

Instead of subscribing to the page eventbus, subscribe to the page’s event manager (you’ll have to bump your SDK version). There was a catastrophic performance cliff in Guava’s eventbus, so we had to migrate away. The API is roughly the same, but the internals are different.

Thanks a lot @PGriffith !

I suppose that it’s the same for session message, I have to use event Manager instead of event bus:

before 8.1.17:

	perspectiveContext.getSessionMonitor().findSession(sessionId).ifPresent(session -> {
			PyDictionary payloadMap = new PyDictionary();
			payloadMap.put("sessionId", sessionId.toString());
			payloadMap.put("id", id);
			payloadMap.put("qv", qv);
			UserScopeMessageEvent message = new UserScopeMessageEvent(messageHandler, payloadMap);
			logger.debug("SessionEventBus().post : sessionId={}, id={}, qv={}",sessionId.toString(),id,qv);
			session.queue().submit(() -> session.getEventBus().post(message));

from 8.1.17:

session.queue().submit(() -> session.getEventManager().post(message));
1 Like

Yeah, pretty much everything in Perspective was refactored to have the two side by side. I think we’re planning to remove the eventbus stuff in Perspective in 8.2.X, but I’m not positive on that.

1 Like