Re: How to implement a peek ahead / skip processing in queue

2015-11-20 Thread apara
So, the question really is: Is there a way to control how messages are de-queued? In other words: Instead of this: 1) Message is dequeued 2) Load balancer cannot be sent onto the proper destination because it's queue is full 3) Load balancer blocks How can I implement: 1) Peek at the

How to implement a peek ahead / skip processing in queue

2015-11-18 Thread apara
I need to process events from thousands of logical streams (discriminated by request.body.partitionKey) in order by stream. In other words, events from a particular stream need to be processed in strict order, however, events between the streams can be processed asynchronously. To accomplish

Re: Possible bug with BeanInfo.introspect in 2.15.3 version

2015-10-22 Thread apara
I have created issue https://issues.apache.org/jira/browse/CAMEL-9243 with some test code to demonstrate this regression in 2.15.3. -- View this message in context: http://camel.465427.n5.nabble.com/Possible-bug-with-BeanInfo-introspect-in-2-15-3-version-tp5772875p5772977.html Sent from the

Possible bug with BeanInfo.introspect

2015-10-19 Thread apara
Camel 2.15.3 I have the following structure: public interface Handler { Data handle(Data data); } public class AbstractHandler implements Handler { public Data handle(Data data) {... implementation ...} } public class ConcreteHandler extends AbstractHandler { ... no specific

Not sure why I get DirectConsumerNotAvailableException: No consumers available on endpoint

2015-08-18 Thread apara
So, I essentially have two RouteBuilders. The MainRouteBuilder uses the services of the PipelineRouteBuilder to create the routes. RouteInitializer is a Spring bean which acts as a controller mainly interfacing with spring and issuing a new on MainRouteBuilder. Everything works fine and the

Re: Not sure why I get DirectConsumerNotAvailableException: No consumers available on endpoint

2015-08-18 Thread apara
So, after reading some more, I decided to add a manual start: //Add the route to the context // camelContext .addRoutes( new PipelineRouteBuilder( camelContext, order,

Re: Not sure why I get DirectConsumerNotAvailableException: No consumers available on endpoint

2015-08-18 Thread apara
When I change the direct:// to vm:// I don't get an error right away, but in 30 seconds I get: ExchangeTimedOutException: The OUT message was not received within: 3 millis So, somehow the route is not attaching to the end point? Here is the code as it stands now: public

Adding some parallelism to synchronous route

2015-06-30 Thread apara
I have a route which routs message between different beans: .bean(a) .bean(b) .bean(c) .bean(d) .bean(e) I am realizing that processing of beans b, c, d does not need to be sequential, but can in fact be performed in parallel. However, e, still need to occur after all a,b,c,d, have been

LoadBalancer seems to be doing some sort of throttling

2015-05-21 Thread apara
I am using Camel 2.15.1. I have a route defined like this: from( vmAsyncEndpoint //vm://async.handle.event?blockWhenFull=truesize=4 ) .routeId(vmAsyncEndpoint.getEndpointUri()) .startupOrder(order()) .loadBalance() .sticky(

Re: LoadBalancer seems to be doing some sort of throttling

2015-05-21 Thread apara
So, it turns out that the processing of simple expressions is apparently somewhat slow (my camel routes are currently handling 2300 events/second) so each message is taking milliseconds to get through the pipelines. If the load balancing calculation takes too long it cannot keep the pipelines

Re: vm protocol threading behaviour

2015-05-03 Thread apara
By default vm routes have 1 processing thread. Set concurrentConsumers to more than 1 to get threading. See these optionshttp://camel.apache.org/seda.html -- View this message in context: http://camel.465427.n5.nabble.com/vm-protocol-threading-behaviour-tp5765941p5766635.html Sent from the

Failed to start route route4 because of startupOrder clash. Route route3 already has startupOrder 498 configured which this route have as well

2015-05-02 Thread apara
I am creating a lot of routes dynamically and wanted to make sure that lower level dependents start first before those routes that depend on them. However, I am getting this error: Failed to start route route4 because of startupOrder clash. Route route3 already has startupOrder 498 configured

CamelContext.shutdown takes a long time(), almost a second per route

2015-05-02 Thread apara
I have a CamelContext with 12 routes and it takes about 11 seconds (or close to 1 second per route) to execute a graceful shutdown. INFO [main] org.apache.camel.impl.DefaultShutdownStrategy [DefaultShutdownStrategy.java:247] Graceful shutdown of 12 routes completed in 11 seconds Since I am

Re: CamelContext.shutdown takes a long time(), almost a second per route

2015-05-02 Thread apara
As documented in the SEDA endpoint, the solution was to reduce pollTimeout from 1 second down to a small number, but this results in more CPU being consumed while the system is in the idle state waiting for work. I may need to play with the DefaultShutdownStrategy to possibly do an interrupt

AmbiguousMethodCallException but both methods are the same!

2015-04-30 Thread apara
-123b93f75cba) thread #8 - CamelInvocationHandler] com.mediaplatform.CAMEL-IN-beforeEventLogger [CamelLogger.java:170] Exchange[ , Id: ID-apara-i-standardset-com-65381-143038386-0-12 , ExchangePattern: InOut , Properties: {CamelCreatedTimestamp=Thu Apr 30 01:05:31 PDT 2015, CamelMessageHistory

Re: AmbiguousMethodCallException but both methods are the same!

2015-04-30 Thread apara
So, I think I figured out what happens. Only the initial invocation on the proxy is a Method Invocation. So, that un-ambiguously up-calls the implemented method. However, after the initial invocation, the result is put into the Exchange, and the exchange continues to carry NOT the

Re: Unable to setup route with limit of 30 queue size and 5 processing threads

2015-04-30 Thread apara
I think I am getting closer. I replaced my exports back to direct:// and re-implemented asyncHandle method by using my own pool: ... private final ExecutorService executor = Executors.newFixedThreadPool(20); ... @Override public FutureEventData asyncHandle(final

Cannot locate BeanDefinitionParser for element [threadPoolProfile]

2015-04-29 Thread apara
I added this definition to my spring wiring: ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/spring; xsi:schemaLocation=

How to get specific context with CamelContextAware interface?

2015-04-29 Thread apara
I have multiple camel contexts in my application. How do I get a specific context with CamelContextAware interface implementation? Thanks. -AP_ -- View this message in context: http://camel.465427.n5.nabble.com/How-to-get-specific-context-with-CamelContextAware-interface-tp5766519.html Sent

Unable to setup route with limit of 30 queue size and 5 processing threads

2015-04-29 Thread apara
I am trying to build a route at runtime which limits the caller to maximum of 30 objects in a queue, with 5 concurrent processing threads. I also want the caller to get an exception when more than 30 objects attempt to be inserted into the route. Following this example:

Re: Unable to setup route with limit of 30 queue size and 5 processing threads

2015-04-29 Thread apara
I tried this variation: routeDefinition = from( routeName ) .threads() .executorServiceRef(bigPool) .inOnly( vm:single.record.processor?concurrentConsumers=5size=30 ); By adding

org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis

2015-04-29 Thread apara
All my beans in the route implement this interface: public interface Handler { EventData handle(EventData data) throws HandlerException; } They are all exported via camel:export and the following works nicely: camel:route camel:from uri=direct://handle.event /

Re: Unable to setup route with limit of 30 queue size and 5 processing threads

2015-04-29 Thread apara
Ok, according to documentation on the bottom of this page: http://camel.apache.org/using-camelproxy.html I did the following: public interface AsyncHandler { FutureEventData asyncHandle(EventData data) throws HandlerException; } public interface SyncHandler { EventData handle(EventData

Re: Unable to setup route with limit of 30 queue size and 5 processing threads

2015-04-29 Thread apara
Ok, I just found this thread: http://camel.465427.n5.nabble.com/How-to-impl-bean-side-of-proxy-w-Future-return-td4581104.html Does not look like it's possible to use anything other than direct:// with proxy spring beans. It seems that it should just work, but apparently it does not. Kinda wish

Re: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis

2015-04-29 Thread apara
I spent a day trying to figure this out with no luck. I re-read the threading chapter in Camel in Action book, but could not find how to multi-thread vm:// or seda:// routes. Perhaps I need to go back to using direct:// with some threading option. I just don't know. I tried using: vm://

Re: Unable to setup route with limit of 30 queue size and 5 processing threads

2015-04-29 Thread apara
Just tried, direct-vm... does not work either. Apparently does not concurrentConsumers parameter. -- View this message in context: http://camel.465427.n5.nabble.com/Unable-to-setup-route-with-limit-of-30-queue-size-and-5-processing-threads-tp5766520p5766528.html Sent from the Camel - Users

Re: Unable to setup route with limit of 30 queue size and 5 processing threads

2015-04-29 Thread apara
I found http://camel.apache.org/toasync.html, which I was going to try to implement, however, it seems to be deprecated. Is there a replacement to convert direct:// proxy to async? -- View this message in context:

How do I pair @Consume with @Produce on an interface?

2014-07-02 Thread apara
Using Camel 2.13.1 So, I have defined a @Produce on an interface, which appears to be producing messages correctly (verified via logging): public interface Producer extends CriteriaServiceObserver { @InOnly void created(CriteriaDocument criteria, Map state); @InOnly

Re: How do I pair @Consume with @Produce on an interface?

2014-07-02 Thread apara
So, still sticking with an interface, and trying to make each method put a message on a different queue, I made these change: @InOnly public interface Producer extends CriteriaServiceObserver { @InOnly @Produce(uri = direct://criteria.created.event) void

Re: How do I pair @Consume with @Produce on an interface?

2014-07-02 Thread apara
] ml-node+s465427n5753221...@n5.nabble.com wrote: Hi There is a pojo example at http://camel.apache.org/pojo-messaging-example.html And see the links in the bottom of that page too. On Wed, Jul 2, 2014 at 5:04 PM, apara [hidden email] http://user/SendEmail.jtp?type=nodenode=5753221i=0 wrote

How to pass properties between endpoints...

2013-09-01 Thread apara
Before converting the event to JSON, I would like to store some variables from the event and later use them in a to: destination. So, am using header to stash away the values prior to conversion. Is this the best way of doing this, or should I be using properties? camel:route

Re: Messages seem to contain more than I expected...

2013-08-31 Thread apara
To close out this thread, here is the solution. Because Camel does not know that the consumer on the other end is NOT Camel, it wraps the @Produce into a BeanInvocation object. Using the convertBodyTo, I am able to tell Camel to convert from BeanInvocation to the value of the first parameter.

Can I use from =direct:abc* for wildcard routing...

2013-08-31 Thread apara
I am building a routing to URI based on the name of class's package: camel:route camel:from uri=direct://start/event / camel:recipientList camel:simple resultType=java.lang.String

Re: STOMP: Exception: The maximum command length was exceeded

2013-08-30 Thread apara
email] wrote: Hi When using these mailing lists / user forums, then you should have a bit of patience as other people often dont have the time to dive into something right away. On Fri, Aug 30, 2013 at 6:30 AM, apara [hidden email] wrote: Dejan, Should I create a formal bug

Re: Messages seem to contain more than I expected...

2013-08-30 Thread apara
I guess, I am not quite sure how the routes and expressions are working. The object which I am sending looks like this: public class UserEarningEvent { private int id; private int userId; ... public int getUserId() { return userId; } } On the other

Re: STOMP: Exception: The maximum command length was exceeded

2013-08-29 Thread apara
Dejan, Should I create a formal bug for this issue with the sample of code which I uploaded to this group? At this point, I tried all the options I could think of and could not fix this issue. For now, we are using JmsTemplate approach to go directly to the ActiveMQ Broker bypassing Camel,

STOMP: Exception: The maximum command length was exceeded

2013-08-27 Thread apara
Hi Group, I am trying to send a message to activeMQ broker via Camel. However, I am getting a Maximum protocol buffer length exeeded exception. Not sure what I am doing wrong. I am able to send STOMP messages using spring's JmsTemplate directly. Broker Configuration (embedded):

Re: STOMP: Exception: The maximum command length was exceeded

2013-08-27 Thread apara
I tried a number of things: 1) Changing broker configuration to: final TransportConnector stompConnector = broker.addConnector(stomp+nio://0.0.0.0:61623); 2) Changing my Camel wiring to use tcp::61623 instead of stomp::61623: bean

Re: STOMP: Exception: The maximum command length was exceeded

2013-08-27 Thread apara
=5738064i=0 Twitter: @dejanb Blog: http://sensatic.net ActiveMQ in Action: http://www.manning.com/snyder/ On Tue, Aug 27, 2013 at 4:07 PM, apara [hidden email]http://user/SendEmail.jtp?type=nodenode=5738064i=1 wrote: I tried a number of things: 1) Changing broker configuration

Re: STOMP: Exception: The maximum command length was exceeded

2013-08-27 Thread apara
://user/SendEmail.jtp?type=nodenode=5738064i=0 Twitter: @dejanb Blog: http://sensatic.net ActiveMQ in Action: http://www.manning.com/snyder/ On Tue, Aug 27, 2013 at 4:07 PM, apara [hidden email]http://user/SendEmail.jtp?type=nodenode=5738064i=1 wrote: I tried a number of things: 1