6

Is it fine to have multiple tags with different channel on a page, for me it never worked. Is it a good use of prime push, Or is there any alternative to receive server push messages from multiple channels on a page. Here is piece of sample code what i have tried

<h:form>
  <p:socket channel="/pushMessages/#{session.id}">
     <p:ajax event="message" update=":navigation-form"/>
  </p:socket>
  <p:socket channel="/pushMessages/cart/#{session.id}">
   <p:ajax event="message" update=":message-form"/>
  </p:socket>
</h:form>
Amit P
  • 467
  • 6
  • 20
  • Should work. Any errors? Weird behaviour? Only the first working? Or the last? And what PF version did you use? – Kukeltje May 20 '15 at 19:55
  • When I tried to have multiple sockets per page (long-polling), request and responses take a very long time (sometimes more than 10 minutes). With websockets its fine but I'm having issues proxying it via Apache. I'm using PF 5.3 and Atmosphere 2.4.4. Did you have the same symptoms as well? – bluebloodedboy Jul 04 '16 at 09:57
  • It never worked for me – Amit P Jul 11 '16 at 11:41

1 Answers1

1

Yes this works for me without a problem in PrimeFaces 6.2 (keep in mind that p:push is deprecated and the JSF 2.3 websockets is advised

Kukeltje
  • 12,223
  • 4
  • 24
  • 47