Re: Testing DSL based on Apache Camel

2013-10-07 Thread Charles Moulliard
The approach followed by SOAUnit is excellent. DSL should be nevertheless improved to allow to set which SOAP, WS-xxx (ws-security, ) spec will be used and provide parameters according to the spec / headers On Sun, Oct 6, 2013 at 11:49 PM, David MacDonald dav...@cdonald.net.nzwrote: Hi

MD5 digest calculation

2013-10-07 Thread Goyal, Arpit
Hi, Is there a component to do MD5 digest calculation in camel? Regards, Arpit.

Re: MD5 digest calculation

2013-10-07 Thread Charles Moulliard
You can use the camel crypto component/dataformat for that purpose : http://camel.apache.org/crypto-digital-signatures.html On Mon, Oct 7, 2013 at 8:32 AM, Goyal, Arpit arpit.go...@sap.com wrote: Hi, Is there a component to do MD5 digest calculation in camel? Regards, Arpit. --

Re: Testing DSL based on Apache Camel

2013-10-07 Thread David MacDonald
Hi Charles, I'm not quite sure what you mean; I'm guessing you can set this via the standard CXF URI format that Camel follows. E.g. It might be possible to set WS-Policy like this but I haven't found a way yet. I was hoping to keep the Camel components quite separate to the testing dsl so

Re: Testing DSL based on Apache Camel

2013-10-07 Thread Charles Moulliard
Sorry for my mistake, I din't realize that SOAUnit (should be perhaps renamed into WebService/REST ...) currently use camel component. So forget my previous remark. On Mon, Oct 7, 2013 at 8:41 AM, David MacDonald dav...@cdonald.net.nzwrote: Hi Charles, I'm not quite sure what you mean; I'm

Re: Testing DSL based on Apache Camel

2013-10-07 Thread David MacDonald
Yeah the name can be a bit confusing, especially with regards to unit testing but it's the closest to a 'unit' that we can achieve with certain service buses... You can also test asynchronous services i.e. if we have a message canonicalizer that takes a target-system message off a JMS destination

Setting the flag non identifying job parameter in Camel route header with camel-spring-batch

2013-10-07 Thread nguyen
Hi all, I'm using camel-spring batch 2.10.3 and integrate with spring batch core 2.2.0. In spring batch 2.2.0, it supports the option of non-identifying job parameters, and I need to modify some of the job parameters to be non-identifying. Currently, all the headers found in the Camel message

Throttling by client ID?

2013-10-07 Thread Daniel Bularzik
We're looking to enforce a per-client SLA; notably, right now we're considering how to throttle service use on a per-client basis. I've found the Throttler Pattern, but this appears to only useful for throttling overall use of the service. Is there a way to use Throttler to limit access on a

Camel Quartz2 Clustering fails due to durable jobs, has anyone got

2013-10-07 Thread Mark Richards - News Systems and Architecture
Hi, I’m using Camel 2.12.1, Quartz 2.2.0, Blueprint and Mysql 5.5 in Karaf 2.3.1 and attempting to use clustering, without any success :-( My aim is to run multiple VMs that will load balance Quartz camel routes and fail over should one stop (losing the odd job schedule isn't too important,

Re: Throttling by client ID?

2013-10-07 Thread James Carman
I actually had to implement that on a whiteboard when interviewing for a certain tech company. It's not terribly difficult to implement such a beast. On Mon, Oct 7, 2013 at 7:59 AM, Daniel Bularzik d...@akc.org wrote: We’re looking to enforce a per-client SLA; notably, right now we’re

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread prabumc...@gmail.com
My message is mapmessage. I.e my map message contain key CREDITORDEBIT.I want check if it is credit i want move message or i want discard the message I have added following code,But this didn't work. .filter(property(CREDITORDEBIT).isEqualTo(CREDIT)) Please kindly help me. -- View this

Re: How to programmatically find next downstream endpoint in a route.

2013-10-07 Thread Chris
James, thanks for the suggestion - I'll try that, however, I would still like to know if/how a given endpoint can programmtically find the next down-stream endpoint in a route... On 10/4/2013 1:38 PM, James Carman wrote: Does a splitter not work for you in this case? On Fri, Oct 4, 2013 at

Is there any way to parameterize a JPQL query when using the JPA component in consumer mode?

2013-10-07 Thread Chris
The only think I see is consumer.parameters - but that's for release 2.12 and I would need to regression-test a lot of stuff to upgrade at this point. Any other way?

Re: How to programmatically find next downstream endpoint in a route.

2013-10-07 Thread James Carman
The next step in the route may not be an endpoint, so it's not addressable in that way. On Mon, Oct 7, 2013 at 12:02 PM, Chris cwolf.a...@gmail.com wrote: James, thanks for the suggestion - I'll try that, however, I would still like to know if/how a given endpoint can programmtically find the

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread kraythe .
choice() .when(simple(${body[CREDITORDEBIT]} == true).to(credit_uri).endChoice() .otherwise().to(debit_uri) .end() *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn:

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread kraythe .
Ack ... premature submit ... check out the content based router EIP. http://camel.apache.org/enterprise-integration-patterns.html *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn:

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread prabumc...@gmail.com
i want use filter not when -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Routing-using-map-message-help-required-tp5740305p5741047.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread prabumc...@gmail.com
Sorry i have copied full code here I hope it will give you idea what i am trying to achieve from(ACT_TYPE_SPECFIC_QNAME).choice() .when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION)) .filter(simple({body[isCredit]} == true)) .process(new Processor() { public void

Problem with mock end points and testing error handling

2013-10-07 Thread berhack
I have context level defined error handling (retry interval and retry attempts defined) that I am trying to test out. Yet it will never be invoked no matter how I simulate the error with mock end points. Does anyone how this can work? Given my route I'm testing just looks like:

Re: Camel routing issue

2013-10-07 Thread prabumc...@gmail.com
Hi all, Good morning, I am trying to use when and filter both in my routing,but it didn't work I hope it will give you idea what i am trying to achieve from(ACT_TYPE_SPECFIC_QNAME).choice() .when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION)) .filter(simple({body[isCredit]} == true))

Re: AW: AW: Camel Routing using map message help required

2013-10-07 Thread Robert Simmons
Filter has to be first in the route. Sent from my iPad On Oct 7, 2013, at 12:14 PM, prabumc...@gmail.com prabumc...@gmail.com wrote: Sorry i have copied full code here I hope it will give you idea what i am trying to achieve from(ACT_TYPE_SPECFIC_QNAME).choice()

RE: Throttling by client ID?

2013-10-07 Thread Daniel Bularzik
So obviously, instead of asking Is there a way... I should have asked How do I... Consider this a restatement of my original question. How would I go about doing this? A summary of a whiteboard implementation would be sufficient. -Original Message- From: jcar...@carmanconsulting.com

return binary image data in camel/restlet environment

2013-10-07 Thread Zemin Hu
I need to return image from route in restlet environment, if in normal camel environment I should be able to do byte[] imageData = getImage(); HttpServletResponse response = exchange.getIn().getBody(HttpServletResponse.class); response.setContentType(image/png); OutputStream os =

CamelBlueprintTestSupport Issues

2013-10-07 Thread Andre Piwoni
Within a maven project that creates bundle I have a test class that extends CamelBlueprintTestSupport with blueprint descriptor under OSGI-INF/blueprint directory. It seems that CamelBlueprintHelper creates two bundles that point to the same Blueprint XML. One bundle is created for

two camel instances and jms failover on a topic

2013-10-07 Thread salemi
Hi All, I like to start two instances of camel. Both of them have a from element that connects to a jms topic. I like one of the Camel connections to be active at the time and if one of them fails the other camel instance will take it over. How would you implement this in Camel? Thanks, Ali

Re: CamelBlueprintTestSupport Issues

2013-10-07 Thread Willem jiang
Hi, CamelBlueprintHelper just creates one test bundle and it will look up the bundles in the class path to install them. I suggest you to massage your class path to exclude the test classes bundle or you just put the test into your test classes bundle. -- Willem Jiang Red Hat, Inc. Web:

Re: two camel instances and jms failover on a topic

2013-10-07 Thread Willem jiang
Please don't send the question across the mailing list. Here is the the answer[1] to activemq user mailing list. [1]http://activemq.2283324.n4.nabble.com/How-to-implement-two-consumers-on-a-topic-Camel-One-of-consumers-is-inactive-until-the-active-one-fa-td4672355.html -- Willem Jiang Red

Camel JMS redelivery blocks normal processing

2013-10-07 Thread berhack
Hi all, Does anyone know how to properly implement redelivery that does not block normal processing of other messages? I have an error handler defined with DLQ, but once that kicks in, no messages will be consumed. I know about asyncConsumer, I set it on the JmsConfiguration but to no avail.

Re: dynamicly change the url of the from element after the camelcontext is started

2013-10-07 Thread salemi
Thank you Babak. It had to overwrite the following methods in order for Spring and Camel to work. public class MyBridgePropertyPlaceholderConfigurer extends BridgePropertyPlaceholderConfigurer{ @Override protected String resolvePlaceholder(String placeholder, Properties

Re: return binary image data in camel/restlet environment

2013-10-07 Thread Willem jiang
Hi, Restlet uses the Representation to define the message and mediate type[1]. Camel-Restlet doesn't support the Representation well, and it just try to turn the bytes into String as a fall back. I just fill a JIRA[2] for it and will commit the fix shortly. You can work around it by changing

Re: Camel routing issue

2013-10-07 Thread kraythe .
Filter has to be first in the route. You can probably only put exception handling and route id before it. The DSL should probably be tighened up for that. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn:

Re: Problem with mock end points and testing error handling

2013-10-07 Thread kraythe .
Yeah you need to mock and skip and then you need to find the mock endpoint and attach it using the weaving code. So something like this: in your advice: mockEndpointsAndSkip(bean:*); Then in your test: final String beanURI = mock:bean:myBean; assertNotNull(beanURI); // DONT FORGET THIS or you

Re: Camel JMS redelivery blocks normal processing

2013-10-07 Thread berhack
By the way, I am using Camel 2.11.1 and also in my error handler I made sure I use asyncDelayedRedelivery. So everything seems to be in order, yet I cannot get the redelivery to be fully async -- View this message in context:

Re: CamelBlueprintTestSupport Issues

2013-10-07 Thread Andre Piwoni
Willem, thank you for reply. My point is that with CamelBlueprintTestSupport that utilizes CamelBlueprintHelper I don't have much control over which bundles are included. Here's sample Maven project structure that creates bundle (not test bundle) and contains test case that extends