Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WildFly Performance Tuning

You're reading from   WildFly Performance Tuning Develop high-performing server applications using the widely successful WildFly platform

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781783980567
Length 330 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. The Science of Performance Tuning FREE CHAPTER 2. Tools of the Tuning Trade 3. Tuning the Java Virtual Machine 4. Tuning WildFly 5. EJB Tuning in WildFly 6. Tuning the Persistence Layer 7. Tuning the Web Container in WildFly 8. Tuning Web Applications and Services 9. JMS and HornetQ 10. WildFly Clustering Index

Tuning MessageProducer


Just as with the Session object, try to reuse a created MessageProducer (within the same thread). It is possible to even reuse a MessageProducer to send messages to different destinations. The trick is to create the producer with a null destination and specify the target destination in the send method instead.

As we briefly mentioned earlier, persisting each incoming message in order to guarantee that they will not be lost in the event of a broker restart or crash will not be positive for performance. It is arguably the most performance-degrading action in messaging. If guaranteed, message delivery is not a requirement for a given scenario; it can be disabled by setting the delivery mode on the relevant MessageProducer to DeliveryMode.NON_PERSISTENT.

It is possible to set the amount of time a message should be kept in the JMS provider by using the setTimeToLive method. Even if this functionality is intended to make sure that what is regarded as old messages isn't processed...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image