camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <>
Subject Re: UuidGenerator performance issue
Date Mon, 20 Sep 2010 18:49:41 GMT
You can provider your down UUIDGenerator implementation. I will provide a
more detailed answer when I'm at home.


Am 20.09.2010 19:05 schrieb "camel_el" <>:


 my system is generating a lot of exchanges (many concurrent threads), so
many that creating an exchange becomes a bottleneck.  An exchangeId is
created by the UuidGenerator class, which is using  SecureRandom then calls its secureRandomSpi:

UuidGenerator.generateUuid() -> UUID.randomUUID() ->
secureRandom.nextBytes(n) -> secureRandomSpi.engineNextBytes(n)

where secureRandomSpi.engineNextBytes(n) is synchronized.  Obviously, this
call becomes a bottleneck.  I have modified UuidGenerator so that it creates
a 1-up number (probably not the best, but it worked for the time being) and
I saw a major performance gain.

Would it be possible to:

1- Change the way Camel creates the exchangeId?
 - or -
2- Provide a hook where we could supply our own ExchangeIdFactory?
If we use our own factory, what are the constraints?

View this message in context:
Sent from the Camel - Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message