TIBCO EMS Queues and Topics are used for JMS messaging for Point to Point and Pub-sub communication respectively for TIBCO BW projects. 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.
Recommended Reading: TIBCO EMS Durable Subscription for Topic Messages Persistence
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.
Nice and useful notes . 🙂
Hi Ajmal,
Your articles are really good and beneficial for the beginners of Tibco.
I have a query here.Could you please let me know how to create dynamic topics from tibco administartor.
Thanks in Advance.
Regards,
Naveen.
Hi Ajmal,
Thanks for your articles. I have a doubt that why queues are used even topics can do the job of queue. Any specific reason?
for load balancing purposes
Can you please explain elaborately. why queues are required even topics can also used for load balancing.
nice
Queues guarantee that the message will be delivered to its receiver. If the receiver cannot be reached, the message may be stored in a database to be resubmitted later after a certain interval until the receiver receives it.
Topics does not provide such guarantee. It is used in fire-and-forget fashion. Whoever is listening (Subscribers) can pick up the message that was broadcast. Those messages are not stored in a database to be republished if no one picked them up.