buddycloud / buddycloud-server-java

The buddycloud server written in Java.
http://buddycloud.com
Apache License 2.0
67 stars 40 forks source link

Questions about incomingQueue and blocking #291

Open imaginator opened 9 years ago

imaginator commented 9 years ago

The following question came up:

in ChannelEngine the method processPacket() is adding incoming packet to incomingQueue. But the queue is implemented as BlockingQueue and for adding is put() used. The put works as it blocks if the queue is full. But there are other methods like add() that adds in not blocking manner and throws exception if the queue is full. In second case war could send error stanza back.

Can someone more "skilled in the art" comment on this?