In TIBCO EMS based messaging, there are two supported models.
- Queue Based Communication
- Topic Based Communication
Queue Based Communication:
In case of Queue based JMS communication, point to point messaging mechanism is used. Queues are maintained on centralized EMS Server and messages flow from one publisher to one subscriber via EMS Server.
EMS Publisher–>EMS Server–> EMS Subscriber
Queues based messaging is point to pint but it should not be confused with peer to peer messaging as centralized EMS Server is responsible for storing and routing messages.
Topic Based Communication:
Topic based EMS Communication is used as publish-subscribe communication model for one-to-many and many-to-many message sending. Just like Queues, topics are also maintained at a centralized EMS Server. For a particular topic, there can be any number of publishers and any number of subscribers.
Should I use queues or topics?
While developing any EMS based application in TIBCO, one key decision to be taken is whether to use topics or queues? Consider following points while taking this decision:
- If messages published on EMS Server are broadcast nature for which you want multiple subscribers to listen, topics should be preferred.
- If you want to ensure that messages are delivered one by one to every subscriber with reliability, consider point to point communication model by using queues.