I read slides from this year\'s UberConf and one of the speakers is making the argument that Spring JMS adds a performance overhead to your message queue system, however I d
I am not messaging guru, I wish you don't me sharing my thought here ;)
There will always be overhead, because you have extra indirection. Even it is simply an extra level in call stack, it is still overhead. However, I believe such overhead is minimal. You may take a look in source code of JmsTemplate. There is not much extra things added by Spring during send. JmsTemplate is doing mostly what you need to do if you are using JMS anyway. You can always argue that those extra checking and deeper method call always takes more CPU cycle and memory. That's true, but I wonder how significant it is.
PubSub and P2P (Topic and Queue in JMS terminology) are just two different models. I believe they are cannot replace each other. You cannot have the "send once and broadcast to multiple receiver" behavior by using Queue, and on the same time you cannot have the guaranteed-delivery behavior when using Topic (unless using Durable Subscriber, but that's another topic). So, choose the right type depends on what you are doing, instead of saying blindly that P2P is superior than PubSub (which I believe is non-sense)