Re: Hystrix Support of dynamic EP "toD"

2016-12-21 Thread linktech
Claus,

I didn't see anything specific on http://camel.apache.org/hystrix-eip on
protecting dynamic EP but it's great that does. Any plans to add this to
producer templates?

Thanks!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Hystrix-Support-of-dynamic-EP-toD-tp5791825p5791843.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Marshaling with multiple BindyFixedLengthDataFormat models (camel-bindy-2.17)

2016-12-21 Thread Raghavan83
I am currently trying to upgrade from camel-bindy-2.11.0 to
camel-bindy-2.17.0 and am running into a problem when trying to apply a
model consisting of multiple classes to a data set resulting in a single
text file.

I had a number of classes in a package (com.sample.package) that I could use
for marshaling by using the following code:





Constructor: BindyFixedLengthDataFormat(String... packages) 

Marshal was done by referencing the bean:



This bean call would apply all the classes in the package to the data being
marshaled resulting in a single file.

It worked great with camel-bindy-2.11.0 but the constructor above is no
longer available with camel-bindy-2.17.0

Has anyone come across similar problem and let me know how it was solved?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Marshaling-with-multiple-BindyFixedLengthDataFormat-models-camel-bindy-2-17-tp5791846.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Sftp - Stepwise & No Such File

2016-12-21 Thread Goyal, Arpit
Hello

For a running scenario we switch to our native JSCH implementation to Camel-Ftp 
implementation to connect to SFTP server.

Server Folder: home/arpit/outbound/
File Name: myDailyReport.csv

Older implementation using native JSCH code - we used to first perform - 
channel.cd("home/arpit/outbound") and then channel.put("myDailyReport.csv").

New Implementation we are using stepwise = false. The reason why we used 
'stepwise = false' because all our available SFTP server failed on CD operation.

QUESTION: Is there some flag which does complete directory CD (rather stepwise) 
 and then do PUT?

Regards,
Arpit.

Reason: We see error [1] and [2] in the logs for ONE specific SFTP Server

[1] org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
store file:  home/arpit/outbound/myDailyReport.csv
[2] Caused by: 2: No such file  at 
com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2833)


Re: Production Standalone

2016-12-21 Thread souciance
I run Camel inside Karaf inside docker. The uptime is very much dependent
on docker. I haven't experienced any issues with Camel so far.

On Wed, Dec 21, 2016 at 10:13 PM, sa_james [via Camel] <
ml-node+s465427n5791835...@n5.nabble.com> wrote:

> I have something like 30 routes. I would like to start with standalone
> first and eventually move on to the next step. Wanted to know whether or
> not a lot of people are running camel standalone successfully ...Uptime is
> my most important characteristic at the moment.
> Guile Newbie
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Production-Standalone-
> tp5791833p5791835.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Production-Standalone-tp5791833p5791837.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Cancelling messages

2016-12-21 Thread Glenn Puckett
My user has a UI that shows all messages that have been processed by or are
currently being processed by the Camel API.  During the time a message is in
process they want to be able to cancel the message.  In the application I
have code in a rest service that is called by the UI.  It contains:


public void cancelExchange(String exchangeId) {
synchronized (this.camelContext) {
// Get a list of all in flight exchanges with the passed in
exchangeId
final List exchanges =
this.camelContext.getInflightRepository().browse().stream().filter(inflightExchange
-> inflightExchange.getExchange().getExchangeId().equals(exchangeId))
   
.map(InflightRepository.InflightExchange::getExchange).collect(Collectors.toList());

// Remove any active exchanges from Camel
for (final Exchange exchange : exchanges) {
this.log.debug("Removing exchange {}",
exchange.getExchangeId());

this.camelContext.getInflightRepository().remove(exchange);

// Set the ROUTE_STOP property so Camel will try to stop the
Exchange on the next
// retry
exchange.setProperty(Exchange.ROUTE_STOP, Boolean.TRUE);
}
}

This is not working.  I identified an endpoint that is refusing connections. 
It goes through the re-delivery tries and eventually fails.  What do I need
to do to tell Camel to drop that message?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Cancelling-messages-tp5791836.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Production Standalone

2016-12-21 Thread sa_james
I have something like 30 routes. I would like to start with standalone first
and eventually move on to the next step. Wanted to know whether or not a lot
of people are running camel standalone successfully ...Uptime is my most
important characteristic at the moment.



-
Guile Newbie
--
View this message in context: 
http://camel.465427.n5.nabble.com/Production-Standalone-tp5791833p5791835.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Production Standalone

2016-12-21 Thread souciance
What sort of metrics are you after? In what kind of environment?

On Wed, Dec 21, 2016 at 10:05 PM, sa_james [via Camel] <
ml-node+s465427n5791833...@n5.nabble.com> wrote:

> Anyone running any serious app standalone in prod? Uptime?
> Thanks
> Guile Newbie
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Production-Standalone-tp5791833.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Production-Standalone-tp5791833p5791834.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Production Standalone

2016-12-21 Thread sa_james
Anyone running any serious app standalone in prod? Uptime?
Thanks



-
Guile Newbie
--
View this message in context: 
http://camel.465427.n5.nabble.com/Production-Standalone-tp5791833.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Lookup host and port info of Destinations in Route from Service Registry

2016-12-21 Thread Claus Ibsen
Its coming. See Lukas blog
https://lburgazzoli.github.io/2016/12/21/A-camel-running-in-the-clouds.html

On Tue, Dec 20, 2016 at 8:10 AM, sridharb  wrote:
> Hi,
>
> Is there way to leverage the features of Service Discovery and Load
> Balancing provided by Spring Cloud Eureka in a Apache Camel Application.
>
> I am looking for a way to lookup up the destinations used in Camel routes
> from a Service registry like Eureka.
>
> Thanks,
> Sridhar
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Lookup-host-and-port-info-of-Destinations-in-Route-from-Service-Registry-tp5791729.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Hystrix Support of dynamic EP "toD"

2016-12-21 Thread Claus Ibsen
Do you refer to
http://camel.apache.org/hystrix-eip

If so no, then anything in the  block is protected by
hystrix, also all of 


On Wed, Dec 21, 2016 at 9:15 PM, linktech  wrote:
> Does anyone know if the Hystrix implementation supports protecting dynamic
> EP? Most of the EPs for this application will be configuration driven and I
> don't want to have circuit breaker for all EPs.
>
> Thanks,
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Hystrix-Support-of-dynamic-EP-toD-tp5791825.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Hystrix Support of dynamic EP "toD"

2016-12-21 Thread linktech
Does anyone know if the Hystrix implementation supports protecting dynamic
EP? Most of the EPs for this application will be configuration driven and I
don't want to have circuit breaker for all EPs.

Thanks,



--
View this message in context: 
http://camel.465427.n5.nabble.com/Hystrix-Support-of-dynamic-EP-toD-tp5791825.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Quartz Job not running properly

2016-12-21 Thread anilkumar311987
Hi I'm new to Apache Camel , trying to write one route to move files from one
location to other, I want to move the files only once for every five
minutes. If I move the files once again I need to wait for 5 minutes again
to move here is the code that I wrote:

public static void main(final String[] arguments) {
final CamelContext camelContext = new DefaultCamelContext();
try {
camelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {

CronScheduledRoutePolicy policy= new 
CronScheduledRoutePolicy();
policy.setRouteStartTime("* */5 * * * 
?");

from("file:C:\\camel\\input")

.routeId("testRoute").routePolicy(policy)
.to("file:C:\\camel\\output");

}
});
camelContext.start();
Thread.sleep(5);

} catch (Exception camelException) {
}

but when I execute the code, it is moving the files for every 3 seconds,
trying to understand how it works, tried lot of options and fed up with
this, Can some one please help me, My requirement is it should move the
files once and wait for 5 minutes and them move again. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-Job-not-running-properly-tp5791816.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-bindy issue with header and missing locale

2016-12-21 Thread Claus Ibsen
Hi

Yeah sounds like an issue, you are welcome to log a JIRA and provide a
patch or better github PR
http://camel.apache.org/contributing

On Tue, Dec 20, 2016 at 5:01 PM, dabby11  wrote:
> Hi,
>
>   I'm developing a route with Camel 2.16.1 that uses Bindy to process a file
> with fixed length records. The file consists of a header and many rows.
> I'm unmarshalling the stream with the following data format:
>
> BindyFixedLengthDataFormat bindy = new
> BindyFixedLengthDataFormat(DocumentRow.class);
> bindy.setLocale("default");
>
> and my model classes are something like:
>
> @FixedLengthRecord(header = DocumentHeader.class)
> public class DocumentRow {
>
> ...
>
> @DataField(pos = 10, pattern="+0.00;-0.00", precision 
> = 2,
> length = 13, decimalSeparator = ",")
> private BigDecimal value;
>
> ...
> }
>
> @FixedLengthRecord
> public class DocumentHeader {
>
> ...
>
> @DataField(pos = 365, pattern="+.00;-.00",
> precision = 2,  length = 16, decimalSeparator = ",")
> private BigDecimal total;
>
> ...
>
> }
>
> Bindy fails to parse the DocumentHeader.total field with a
> java.lang.NumberFormatException.
>
> It seems the locale specified with bindy.setLocale("default") is not passed
> to the inner headerFactory in the BindyFixedLengthDataFormat and Bindy tries
> to parse the number calling BigDecimal constructor, instead of parsing it
> with DecimalFormat.
> Indeed, if I execute the following (ugly!) code before creating the route:
>
>   bindy.getFactory();
>
>   Field field =
> BindyFixedLengthDataFormat.class.getDeclaredField("headerFactory");
>   field.setAccessible(true);
>   BindyFixedLengthFactory headerFactory =
> (BindyFixedLengthFactory)field.get(bindy);
>
>   headerFactory.setLocale(bindy.getLocale());
>
> to force the locale, everything's fine.
>
> So I think that in BindyFixedLengthDataFormat.createModelFactory() after
> headerFactory creation there should be a call to
>
> headerFactory.setLocale(getLocale())
>
> or something like that (and a similar line for footerFactory).
>
> I checked 2.17.x and 2.18.x branches of BindyFixedLengthDataFormat.java and
> there's not something like this.
>
> So the question is: is this really an issue with Bindy or should I achieve
> this result in a different way ?
>
> Regards,
>   Marco
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-bindy-issue-with-header-and-missing-locale-tp5791746.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: how to change the logging level dynamically

2016-12-21 Thread mkrishnap
Hi Yogesh,

I come across this approach.. By webpage interface
(LogManger.getLogger()) is not helping on getting the loggers into the
system.

   My expectation is, is their any way, to get this
MyLoggingSentEventNotifer  class logger and change through another java
class while the application up?

Thanks,
Murali



--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-change-the-logging-level-dynamically-tp5791782p5791814.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: how to change the logging level dynamically

2016-12-21 Thread yogu13
check JMX.. log4j configurations can be chabged via JMX

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-change-the-logging-level-dynamically-tp5791782p5791813.html
Sent from the Camel - Users mailing list archive at Nabble.com.