Hi Nick Did you have time to do any profiling or running some tests generating logging output?
On Wed, Jun 23, 2010 at 4:43 PM, Claus Ibsen <[email protected]> wrote: > Hi > > Maybe you could enable more logging and use that to see if you can > spot an obvious time gap between the two? > > org.apache.camel.impl.ProducerCache=TRACE > org.apache.camel.util.ServiceHelper=TRACE > > The ServiceHelper logs when producers/consumers etc. is being started stopped. > > You can also use an EventNotifier to log the time it takes to send a > message to a endpoint. > Also JMX gathers stats as well. > > Also a real profiler can help as well. > > > On Wed, Jun 23, 2010 at 1:55 PM, NickWK <[email protected]> wrote: >> >> Hi Claus, >> >> Thanks for your quick response. >> >> I using WebSphere MQ queues and a SQL Server 2005 database table as my >> endpoints. I have made a code change this morning to cache the endpoints >> once they have been created from the CamelContext using: >> >> Endpoint endpoint = camelContext.getEndpoint(uri) >> >> This along with a few other changes has improved the performance of the >> routing from 4msgs/s to about 8msgs/sec but this is still well down on the >> 23msgs/s I get with the pure Java DSL version. Please note that I am using >> the WebSphere transaction manager to provide XA transaction coordination in >> all my routes. >> >> My Camel route that uses the ProducerTemplate is given below: >> >> from("webspheremqxa:queue:input_queue"). >> transacted(). >> to("myParsingEngine"). >> to("myClient"). >> end(); >> >> Where myParsingEngine processor loads the message in memory and myClient >> processor manipulates the emssage and writes it to a WebSphere MQ queue and >> a SQLServer table using the ProducerTemplate. >> >> My pure Java DSL route is given below: >> >> from("webspheremqxa:queue:input_queue3"). >> transacted(). >> to("myParsingEngine"). >> multicast(). >> pipeline(). // Route to the JDBC endpoint >> choice(). >> >> when().method("myRoutingConditions","matches"). >> >> to("bean:myTransformEngine?method=doMappingOnly"). >> >> to("bean:mySelector?method=toSqlServerSql"). >> to("jdbc:mssql-2005-xa-ds"). >> //when(). >> //otherwise(). >> end(). >> end(). >> pipeline(). // Route to the JMS endpoint >> choice(). >> >> when().method("myRoutingConditions","matches"). >> >> to("bean:myTransformEngine?method=doMappingOnly"). >> >> to("bean:myFormattingEngine?method=serialiseOnly"). >> >> to("webspheremqxa:queue:swift_output_queue2"). >> //when(). >> //otherwise(). >> end(). >> end(). >> end(); >> >> Any further guidance would be greatly appreciated. >> >> Regards, >> >> Nick >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Performance-loss-observed-when-using-the-ProducerTemplate-to-send-an-exchange-to-an-endpoint-tp510843p510886.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
