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
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
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
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
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
So, after reading some more, I decided to add a manual start:
//Add the route to the context
//
camelContext
.addRoutes(
new PipelineRouteBuilder(
camelContext,
order,
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
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
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(
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
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
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
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
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
-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
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
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
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=
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
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:
I tried this variation:
routeDefinition =
from(
routeName
)
.threads()
.executorServiceRef(bigPool)
.inOnly(
vm:single.record.processor?concurrentConsumers=5size=30
);
By adding
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 /
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
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
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://
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
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:
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
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
]
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
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
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.
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
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
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
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,
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):
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
=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
://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
40 matches
Mail list logo