Search code examples
tibcotibco-rvtibco-topic

If there are two listeners / subscribers which one replies to TibRvdTransport.sendRequest(message,timeout)


if I am sending a message onto a multicast topic using:

TibrvMsg replyMessage = TibRvdTransport.sendRequest(message,timeout)

and there are two subscribers, which one actually sends the replyMessage, and what happens to the other replyMessage ?

I can only guess the fastest one that that answers. But I cannot see this documented anywhere.


Solution

  • Since your components are decoupled, they are unaware of each other. Rendezvous is pub-sub, which means that all subscribers receive all messages published to subjects that they have subscribed to. Furthermore, Rendezvous uses a peer-to-peer messaging approach vis-a-vis a centralized message forwarding approach. Therefore both components will receive the message and both components will reply.

    If this is not the desired behavior, with Rendezvous you can use a distributed queue (RVDQ). With that approach a "scheduler" assigns work to workers, ensuring that messages get processed only once.