This discussion is archived
2 Replies Latest reply: Jan 4, 2012 10:42 AM by Johnny_hunter RSS

the thread safety of a message broker's callback

Johnny_hunter Newbie
Currently Being Moderated
Hello all:

I am using a message broker called Solace (similar to Tibco in term of its APIs), but this question applies to message brokers in general as well.

There is a callback method XMLMessageListener#onReceive(), which dumps the requests from clients. The question is, when multiple requests rush in simultaneously, will they queue up to be processed? For instance, request #2 won't enter the method onReceive until request #1 is processed or offloaded by a subtask?

It's the only way I can image how a message broker ensure the thread safety in this scenario. Can anyone correct me if I am wrong?

Thanks, Johnny


  • Correct Answers - 10 points
  • Helpful Answers - 5 points