> I also want to know how the message is deliverer to listener when multiple publisher published messages ? what happens when they publish message at the same time..
Pubsub itself is single threaded. The listeners are called in same thread as sender. In a single threaded app, only one message can be sent at a time, and next message can be published only when all listeners have processed the previous message. When sender and receiver "live" in different threads, you should queue sent messages via a sync queue specific to each listener, and have the receiving threads check for messages on these queues.
ahh...for me some of my senders and receiver "live" in different threads and few senders are in same thread as receiver. So for all those senders which are in different thread. I will create a queue and push the messages to queue then do I need pass whole queue itself ?
For all those senders which in same thread as that of receiver it should be as it is.