createPipeTransport on diffrent nodes

Hi Mediasoup Team !
Im tring to cluster My Project so i do this scenario :
I Have 2 Nodes (Should they be on different hosts):
lets call them nodeA and nodeB
im tring to use createPipeTransport on each and try produce from A to B or reverse of it
so this is what i do :

  1. From A : createPipeTransport()
  2. From B : createPipeTransport()
  3. User want to produce camera for example so first i Connect A to B : this.pipeTransport.connect() then this.pipeTransport.produce()
  4. By signaling server i say to client on B to new Producer and it will try to consume it from B
  5. first i connect B to A : this.pipeTransport.connect()
  6. and try to consume it : await this.pipeTransport.consume()

but i log pipeTransport in B server there is no consumers (Map size is 0)

q1 : am i wrong steps ?
q2 : how can check them connected each other (ip or port is correct or not )

this scenario just for test to find how it works
thnx for your support

  1. You connect both nodes using a PipeTransport in each one. This means you call connect() on both before trying to relay any Producer between them.
  2. Once connected, and once you create a Producer in Node A, do pipeTransport.consume(producerId), and pass the Consumer data (.rtpParameters) to Node B.
  3. In Node B you call pipeTransport.produce() with those rtpParameters.
1 Like

it works now :heart_eyes:
thanks or as we say in persian “Damet Garm” :sweat_smile: