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 messag
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 this
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 Cam
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 overr
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 ProducerTemplat
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 appl
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 processe
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 full
I am using Camel 2.15.1.
I have a route defined like this:
from(
vmAsyncEndpoint
//vm://async.handle.event?blockWhenFull=true&size=4
)
.routeId(vmAsyncEndpoint.getEndpointUri())
.startupOrder(order())
.loadBalance()
.sticky(
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 C
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
first
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 whi
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 buildi
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
MethodInvocati
] 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=[DefaultMessageHistory[routeId=route2, node=to2]],
CamelToEndpoint
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 Future asyncHandle(final EventData
Ok, according to documentation on the bottom of this page:
http://camel.apache.org/using-camelproxy.html
I did the following:
public interface AsyncHandler {
Future asyncHandle(EventData data) throws HandlerException;
}
public interface SyncHandler {
EventData handle(EventData data) thro
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:
http://camel.465427.n5.nabble.com/Unable-to-setup-route-with-limit-of-30-queue
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
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 mai
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://
seda:/
I tried this variation:
routeDefinition =
from(
routeName
)
.threads()
.executorServiceRef("bigPool")
.inOnly(
"vm:single.record.processor?concurrentConsumers=5&size=30"
);
By adding c
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:
https://code.google.com/p/
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 f
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:
I added this definition to my spring wiring:
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="
http://www.springframework.org/schema/beans
http:
Camel] <
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]
>
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 created(C
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
We have ActiveMQ setup in an HA configuration using a network of brokers. We
need to throttle messages to an external consumer. I know Camel has
throttling included, but will it work accurately inside of ActiveMQ in
multi-broker configuration?
Thanks.
--
View this message in context:
ht
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?
...
I am building a routing to URI based on the name of class's package:
direct://start/event/${in.body.class.package.name}
Later, I want to create a wildcard route that looks something lik
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. Th
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 side
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, A
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, howev
> --
> Dejan Bosanac
> --
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5738064&i=0>
> Twitter: @dejanb
> Blog: http://sensatic.net
> ActiveMQ in Action: http://www.manning.co
t; FuseSource is now part of Red Hat
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5738064&i=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 <
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:
3)
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):
=
41 matches
Mail list logo