LiferayIPC messages between two Vaddin portlets

I want to send the event from one portlet to another.
How actually the LiferayIPC component works? If I have 2 different portlets, should I create a single instance of LiferayIPC and share it between two portlets? Or each portlet can create its own LiferayIPC instance?

Right now, I created a separate LiferayIPC instance in each portlet. Looks like event sending from one portlet to another still working despite the fact each portlet has its own LiferayIPC instance. How does it work and what is the proper way to implement LiferayIPC?


LiferayIPC uses the Javascript messaging API Liferay provides. This means you should add a LIferayIPC instance in each portlet that wants to participate in the communication and the messages are sent to all LiferayIPC instances available on the same page.


Thank you very much for so fast and precise answer!