[CONF] Apache Camel > UuidGenerator

2014-08-22 Thread Claus Ibsen (Confluence)














  


Claus Ibsen edited the page:
 


UuidGenerator   






...
Starting with Camel 2.5, Camel supports 3rd party UUID generator(s). This is useful, if e.g. your messaging provider does not support UUID's with a length of 36 characters (like Websphere MQ). Another useful scenario is to use a simple counter for testing purpose. With this it is easier to correlate the exchanges in the log/debugger.
 Camel uses UUIDs in the exchange and message ids, and other unique ids it uses. 
You only have to implement org.apache.camel.spi.UuidGenerator and tell Camel, that it should use your custom implementation:
Configuring from Java DSL



 Code Block




 

getContext().setUuidGenerator(new MyCustomUuidGenerator());
 



...
Camel will configure this UUID generator by doing a lookup in the Spring bean registry to find the bean of the type org.apache.camel.spi.UuidGenerator.



 Code Block




 




  


  

 



...






 View Online  · Like  · View Changes  
 Stop watching space  · Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






[CONF] Apache Camel > UuidGenerator

2013-07-08 Thread Claus Ibsen (Confluence)







UuidGenerator
Page edited by Claus Ibsen


 Changes (1)
 




...
- {{org.apache.camel.impl.ActiveMQUuidGenerator}} - This implementation use the ActiveMQ style of ID's. This implementation may use some APIs from the JDK which is forbidden to use if running in the cloud (such as Google App Engine) and therefore you may have to use one of the other generators.  
h4. ActiveMQUuidGenerator  From *Camel 2.10.7/2.11.1* onwards the JVM system property with key: {{activemq.idgenerator.port}} can be used to assign a specific port which is used during initialization of the UUID generator. By default the port number 0 is used. Though in some cloud infrastructures this is not allowed, and thus a specific port can be assigned instead.   
h3. The default generator  
...


Full Content

UuidGenerator

Starting with Camel 2.5, Camel supports 3rd party UUID generator(s). This is useful, if e.g. your messaging provider does not support UUID's with a length of 36 characters (like Websphere MQ). Another useful scenario is to use a simple counter for testing purpose. With this it is easier to correlate the exchanges in the log/debugger.

You only have to implement org.apache.camel.spi.UuidGenerator and tell Camel, that it should use your custom implementation:

Configuring from Java DSL



getContext().setUuidGenerator(new MyCustomUuidGenerator());



You should not change the UUID generator at runtime (it should only be set once)!

Configuring from Spring DSL

Camel will configure this UUID generator by doing a lookup in the Spring bean registry to find the bean of the type org.apache.camel.spi.UuidGenerator.






  


  




Provided implementations

Camel comes with three implementations of org.apache.camel.spi.UuidGenerator:

	org.apache.camel.impl.JavaUuidGenerator - This implementation uses java.util.UUID. The java.util.UUID is synchronized and can therefore affect performance on high concurrent systems. Therefore consider one of the generators.
	org.apache.camel.impl.SimpleUuidGenerator - This implementation use internally a java.util.concurrent.atomic.AtomicLong and increase the ID for every call by one. Starting with 1 as the first id.
	org.apache.camel.impl.ActiveMQUuidGenerator - This implementation use the ActiveMQ style of ID's. This implementation may use some APIs from the JDK which is forbidden to use if running in the cloud (such as Google App Engine) and therefore you may have to use one of the other generators.



ActiveMQUuidGenerator

From Camel 2.10.7/2.11.1 onwards the JVM system property with key: activemq.idgenerator.port can be used to assign a specific port which is used during initialization of the UUID generator. By default the port number 0 is used. Though in some cloud infrastructures this is not allowed, and thus a specific port can be assigned instead. 

The default generator

From Camel 2.5 onwards the ActiveMQUuidGenerator is the default generator because its the fastest.
In Camel 2.4 or older the default is the JavaUuidGenerator generator.
In Camel 1.x the default generator is likewise the ActiveMQUuidGenerator.



Stop watching space
|
Change email notification preferences

View Online
|
View Changes
|
Add Comment









[CONF] Apache Camel > UuidGenerator

2010-09-29 Thread confluence







UuidGenerator
Page edited by Ashwin Karpe


 Changes (1)
 



h2. UuidGenerator  
Starting with *Camel 2.5*, Camel supports 3rd party UUID generator(s). This is useful, if e.g. your messaging provider does not support UUID's with a length of 36 characters (like Websphere MQ). Another useful scenario is to use a simple counter for testing purpose. With this it is easier to correlate the exchanges in the log/debugger. 
 You only have to implement {{org.apache.camel.spi.UuidGenerator}} and tell Camel, that it should use your custom implementation: 
...

Full Content

UuidGenerator

Starting with Camel 2.5, Camel supports 3rd party UUID generator(s). This is useful, if e.g. your messaging provider does not support UUID's with a length of 36 characters (like Websphere MQ). Another useful scenario is to use a simple counter for testing purpose. With this it is easier to correlate the exchanges in the log/debugger.

You only have to implement org.apache.camel.spi.UuidGenerator and tell Camel, that it should use your custom implementation:

Configuring from Java DSL



getContext().setUuidGenerator(new MyCustomUuidGenerator());



You should not change the UUID generator at runtime (it should only be set once)!

Configuring from Spring DSL

Camel will configure this UUID generator by doing a lookup in the Spring bean registry to find the bean of the type org.apache.camel.spi.UuidGenerator.



"activeMQUuidGenerator" class="org.apache.camel.impl.ActiveMQUuidGenerator" />

"camel" xmlns="http://camel.apache.org/schema/spring">
  
"direct:start" />
"mock:result" />
  




Provided implementations

Camel comes with three implementations of org.apache.camel.spi.UuidGenerator:

	org.apache.camel.impl.JavaUuidGenerator - This implementation uses java.util.UUID. The java.util.UUID is synchronized and can therefore affect performance on high concurrent systems. Therefore consider one of the generators.
	org.apache.camel.impl.SimpleUuidGenerator - This implementation use internally a java.util.concurrent.atomic.AtomicLong and increase the ID for every call by one. Starting with 1 as the first id.
	org.apache.camel.impl.ActiveMQUuidGenerator - This implementation use the ActiveMQ style of ID's. This implementation may use some APIs from the JDK which is forbidden to use if running in the cloud (such as Google App Engine) and therefore you may have to use one of the other generators.



The default generator

From Camel 2.5 onwards the ActiveMQUuidGenerator is the default generator because its the fastest.
In Camel 2.4 or older the default is the JavaUuidGenerator generator.
In Camel 1.x the default generator is likewise the ActiveMQUuidGenerator.



Change Notification Preferences

View Online
|
View Changes
|
Add Comment









[CONF] Apache Camel > UuidGenerator

2010-09-20 Thread confluence







UuidGenerator
Page edited by Claus Ibsen


 Changes (5)
 



...
 Camel comes with three implementations of {{org.apache.camel.spi.UuidGenerator}}: 
- {{org.apache.camel.impl.DefaultUuidGenerator}} - The default Camel UUID generator which use {{java.util.UUID}}. 
- {{org.apache.camel.impl.JavaUuidGenerator}} - This implementation uses {{java.util.UUID}}. The {{java.util.UUID}} is synchronized and can therefore affect performance on high concurrent systems. Therefore consider one of the generators. 
- {{org.apache.camel.impl.SimpleUuidGenerator}} - This implementation use internally a {{java.util.concurrent.atomic.AtomicLong}} and increase the ID for every call by one. Starting with 1 as the first id. 
- {{org.apache.camel.impl.ActiveMQUuidGenerator}} - This implementation use the ActiveMQ/Camel 1.x style of ID's. 
- {{org.apache.camel.impl.ActiveMQUuidGenerator}} - This implementation use the ActiveMQ style of ID's. This implementation may use some APIs from the JDK which is forbidden to use if running in the cloud (such as Google App Engine) and therefore you may have to use one of the other generators.  h3. The default generator  From Camel 2.5 onwards the {{ActiveMQUuidGenerator}} is the default generator because its the fastest. In Camel 2.4 or older the default is the {{JavaUuidGenerator}} generator. In Camel 1.x the default generator is likewise the {{ActiveMQUuidGenerator}}. 

Full Content

UuidGenerator

Starting with Camel 2.5, Camel supports 3rd part UUID generator. This is useful, if e.g. your messaging provider does not support UUID's with a length of 36 characters (like Websphere MQ). Another useful scenario is to use a simple counter for testing purpose. With this it is easier to correlate the exchanges in the log/debugger.

You only have to implement org.apache.camel.spi.UuidGenerator and tell Camel, that it should use your custom implementation:

Configuring from Java DSL



getContext().setUuidGenerator(new MyCustomUuidGenerator());



You should not change the UUID generator at runtime (it should only be set once)!

Configuring from Spring DSL

Camel will configure this UUID generator by doing a lookup in the Spring bean registry to find the bean of the type org.apache.camel.spi.UuidGenerator.



"activeMQUuidGenerator" class="org.apache.camel.impl.ActiveMQUuidGenerator" />

"camel" xmlns="http://camel.apache.org/schema/spring">
  
"direct:start" />
"mock:result" />
  




Provided implementations

Camel comes with three implementations of org.apache.camel.spi.UuidGenerator:

	org.apache.camel.impl.JavaUuidGenerator - This implementation uses java.util.UUID. The java.util.UUID is synchronized and can therefore affect performance on high concurrent systems. Therefore consider one of the generators.
	org.apache.camel.impl.SimpleUuidGenerator - This implementation use internally a java.util.concurrent.atomic.AtomicLong and increase the ID for every call by one. Starting with 1 as the first id.
	org.apache.camel.impl.ActiveMQUuidGenerator - This implementation use the ActiveMQ style of ID's. This implementation may use some APIs from the JDK which is forbidden to use if running in the cloud (such as Google App Engine) and therefore you may have to use one of the other generators.



The default generator

From Camel 2.5 onwards the ActiveMQUuidGenerator is the default generator because its the fastest.
In Camel 2.4 or older the default is the JavaUuidGenerator generator.
In Camel 1.x the default generator is likewise the ActiveMQUuidGenerator.



Change Notification Preferences

View Online
|
View Changes
|
Add Comment









[CONF] Apache Camel > UuidGenerator

2010-08-05 Thread confluence







UuidGenerator
Page  added by Christian Mueller

 

 UuidGenerator

Starting with Camel 2.5, Camel supports 3rd part UUID generator. This is useful, if e.g. your messaging provider does not support UUID's with a length of 36 characters (like Websphere MQ). Another useful scenario is to use a simple counter for testing purpose. With this it is easier to correlate the exchanges in the log/debugger.

You only have to implement org.apache.camel.spi.UuidGenerator and tell Camel, that it should use your custom implementation:

Configuring from Java DSL



getContext().setUuidGenerator(new MyCustomUuidGenerator());



You should not change the UUID generator at runtime (it should only be set once)!

Configuring from Spring DSL

Camel will configure this UUID generator by doing a lookup in the Spring bean registry to find the bean of the type org.apache.camel.spi.UuidGenerator.



"activeMQUuidGenerator" class="org.apache.camel.impl.ActiveMQUuidGenerator" />

"camel" xmlns="http://camel.apache.org/schema/spring">
  
"direct:start" />
"mock:result" />
  




Provided implementations

Camel comes with three implementations of org.apache.camel.spi.UuidGenerator:

	org.apache.camel.impl.DefaultUuidGenerator - The default Camel UUID generator which use java.util.UUID.
	org.apache.camel.impl.SimpleUuidGenerator - This implementation use internally a java.util.concurrent.atomic.AtomicLong and increase the ID for every call by one.
	org.apache.camel.impl.ActiveMQUuidGenerator - This implementation use the ActiveMQ/Camel 1.x style of ID's.




   
Change Notification Preferences
   
   View Online
  |
   Add Comment