Re: ZeroMQ component

2023-08-01 Thread Mark Webb
Ahh that makes sense and is also very unfortunate.

Thanks for the info.

On Tue, Aug 1, 2023, 11:45 AM Andrea Cosentino  wrote:

> Until the license is not compatible with ASF license, we can't take into
> account to move it in the Apache Camel repository.
>
> Il mar 1 ago 2023, 17:40 Nicolas Filotto  ha scritto:
>
> > Hi,
> >
> > AFAIK the components in camel-extra have been moved there because their
> > license is not compatible with an Apache License which is a requirement
> to
> > be in the camel repository.
> >
> > In the case of ZeroMQ, it seems that the license is a Mozilla Public
> > License version 2.0 which is more restrictive than an Apache License
> which
> > is why it is not part of the Camel repository.
> >
> > Regards,
> > Nicolas
> > 
> > From: Mark Webb 
> > Sent: Tuesday, August 1, 2023 17:20
> > To: users@camel.apache.org 
> > Subject: ZeroMQ component
> >
> > I know that the camel-zeromq component exists in the camel-extra repo, is
> > there any chance it could once again find its way into the current
> > "official" trunk?  I'd even be willing to lead and support the effort.
> >
> > I'd prefer to make it based off of JeroMQ and not the Akka version.
> >
> > Would this be possible?
> >
> > - Mark
> >
> > As a recipient of an email from the Talend Group, your personal data will
> > be processed by our systems. Please see our Privacy Notice <
> > https://www.talend.com/privacy-policy/> for more information about our
> > collection and use of your personal information, our security practices,
> > and your data protection rights, including any rights you may have to
> > object to automated-decision making or profiling we use to analyze
> support
> > or marketing related communications. To manage or discontinue promotional
> > communications, use the communication preferences portal<
> > https://info.talend.com/emailpreferencesen.html>. To exercise your data
> > protection rights, use the privacy request form<
> >
> https://talend.my.onetrust.com/webform/ef906c5a-de41-4ea0-ba73-96c079cdd15a/b191c71d-f3cb-4a42-9815-0c3ca021704cl
> >.
> > Contact us here <https://www.talend.com/contact/> or by mail to either
> of
> > our co-headquarters: Talend, Inc.: 400 South El Camino Real, Ste 1400,
> San
> > Mateo, CA 94402; Talend SAS: 5/7 rue Salomon De Rothschild, 92150
> Suresnes,
> > France
> >
>


ZeroMQ component

2023-08-01 Thread Mark Webb
I know that the camel-zeromq component exists in the camel-extra repo, is
there any chance it could once again find its way into the current
"official" trunk?  I'd even be willing to lead and support the effort.

I'd prefer to make it based off of JeroMQ and not the Akka version.

Would this be possible?

- Mark


ZeroMQ Support

2023-05-16 Thread Mark Webb
I've been trying to find information on Apache Camel's support of a ZeroMQ
component.  I see that there was a component back in the 2.x days but I
cannot find anything compatible with the current version of Camel 3.x.

Does the component exist somewhere?  Did support stop for a particular
reason?  I'm very interested in using Apache Camel with ZeroMQ so if
someone could help to get me up to speed on what's going on, it would be
much appreciated.

Mark


Apache Shiro and REST DSL routes

2023-01-17 Thread Mark Webb
Is there any documentation or examples that I can look at to understand how
I can secure my Camel REST routes?  Ideally I'd like to leverage Keycloak
and Shiro for my AuthN/AuthZ.  Let me know if there is anything out there I
can leverage.

Thanks


Re: How to get docker stats ?

2023-01-11 Thread Mark Webb
That worked.  Thank you.



On Wed, Jan 11, 2023 at 10:43 AM Mikael Koskinen  wrote:

> Hey,
>
> Can you use PollEnrich to work around this? Here's an example in YAML:
>
> - route:
> from:
>   uri: timer:test
>   steps:
> - pollEnrich:
> expression:
>   constant:
> expression: docker:stats?containerId=fa05264a1bed
> - to:
> uri: log:logger
>   parameters:
> period: '5000'
>
> Best regards,
> Mikael
>
> ke 11. tammik. 2023 klo 17.02 Mark Webb (elihusma...@gmail.com) kirjoitti:
> >
> > Yes, you are correct.  I had the consumer/producer backwards in my email.
> >
> > I'll look into writing up a PR.
> >
> > Thanks,
> > Mark
> >
> >
> >
> > On Wed, Jan 11, 2023 at 9:18 AM Claus Ibsen 
> wrote:
> >
> > > Hi
> > >
> > > I think you swap the camel consumer vs producer.
> > >
> > > from = consumer
> > > to = producer
> > >
> > > So you want a on-demand get status in a producer (eg to)
> > >
> > > to docker:status?id=aaa
> > >
> > > If so then maybe see if you can add that to the camel-docer and send a
> PR
> > > and create a JIRA
> > >
> > > On Wed, Jan 11, 2023 at 2:42 PM Mark Webb 
> wrote:
> > >
> > > > I have a Docker instance running multiple containers.  I'm trying to
> > > figure
> > > > out how to get stats for each container.  The problem I've run in to
> is
> > > > that the Docker stats operation is only a producer so I can only use
> the
> > > > "from" in a route.  So if I don't know the container ID at build
> time,
> > > how
> > > > can I inject the container ID in a "from" line to follow the
> > > producer-only
> > > > requirement to get Docker container stats.
> > > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -
> > > @davsclaus
> > > Camel in Action 2: https://www.manning.com/ibsen2
> > >
>


Re: How to get docker stats ?

2023-01-11 Thread Mark Webb
Yes, you are correct.  I had the consumer/producer backwards in my email.

I'll look into writing up a PR.

Thanks,
Mark



On Wed, Jan 11, 2023 at 9:18 AM Claus Ibsen  wrote:

> Hi
>
> I think you swap the camel consumer vs producer.
>
> from = consumer
> to = producer
>
> So you want a on-demand get status in a producer (eg to)
>
> to docker:status?id=aaa
>
> If so then maybe see if you can add that to the camel-docer and send a PR
> and create a JIRA
>
> On Wed, Jan 11, 2023 at 2:42 PM Mark Webb  wrote:
>
> > I have a Docker instance running multiple containers.  I'm trying to
> figure
> > out how to get stats for each container.  The problem I've run in to is
> > that the Docker stats operation is only a producer so I can only use the
> > "from" in a route.  So if I don't know the container ID at build time,
> how
> > can I inject the container ID in a "from" line to follow the
> producer-only
> > requirement to get Docker container stats.
> >
>
>
> --
> Claus Ibsen
> -
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: elegant error handling with temporary replyTo ?

2023-01-11 Thread Mark Webb
Thanks Claus.  I can work on fixing this and issuing a pull request.


On Tue, Jan 10, 2023 at 2:29 PM Claus Ibsen  wrote:

> Hi
>
> A ticket to tweak the noisy logging
> https://issues.apache.org/jira/browse/CAMEL-18875
>
> To handle the exception you can configure an exception listener on the jms
> component
>
> On Fri, Jan 6, 2023 at 12:39 PM Claus Ibsen  wrote:
>
> > You can send a PR to tweak the log to not output the stacktrace. We could
> > potentially log including stacktrace in DEBUG mode so end users can turn
> on
> > that logging level in case the stacktrace is needed during
> troubleshooting
> >
> > On Fri, Jan 6, 2023 at 12:22 PM Mark Webb  wrote:
> >
> >> Sure, I could tweak the logger.  I was hoping to not have the stack
> trace
> >> get logged, but a more user-friendly log generated.
> >>
> >> On Fri, Jan 6, 2023 at 12:56 AM Claus Ibsen 
> >> wrote:
> >>
> >> > Hi
> >> >
> >> > Do you want that WARN to not be logged - or the logging to NOT include
> >> the
> >> > stacktrace?
> >> > The log is hardcoded and it can happened when using temporary reply
> >> queues.
> >> >
> >> > You can tweak the logger to set logging level to ERROR
> >> > for TemporaryQueueReplyManager etc
> >> >
> >> >
> >> > On Thu, Jan 5, 2023 at 8:51 PM Mark Webb 
> wrote:
> >> >
> >> > > I'm starting up a project that will use the request/response with
> >> > ActiveMQ
> >> > > AMQP.  When I try to send a message that I expect a response to and
> >> > > ActiveMQ is down, I can't seem to catch or prevent the stack trace
> >> from
> >> > > getting logged for the TemporaryQueueReplyManager.  The error is:
> >> > >
> >> > > Exception inside the DMLC for Temporary ReplyTo Queue for
> destination
> >> > ,
> >> > > refreshing ReplyTo destination
> >> > >
> >> > > How can I go about handling this error in the temporary response
> >> > > processing?  Any help would be appreciated.
> >> > >
> >> > > Thanks,
> >> > > Mark
> >> > >
> >> >
> >> >
> >> > --
> >> > Claus Ibsen
> >> > -
> >> > @davsclaus
> >> > Camel in Action 2: https://www.manning.com/ibsen2
> >> >
> >>
> >
> >
> > --
> > Claus Ibsen
> > -
> > @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
> >
>
>
> --
> Claus Ibsen
> -
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


How to get docker stats ?

2023-01-11 Thread Mark Webb
I have a Docker instance running multiple containers.  I'm trying to figure
out how to get stats for each container.  The problem I've run in to is
that the Docker stats operation is only a producer so I can only use the
"from" in a route.  So if I don't know the container ID at build time, how
can I inject the container ID in a "from" line to follow the producer-only
requirement to get Docker container stats.


Re: elegant error handling with temporary replyTo ?

2023-01-06 Thread Mark Webb
Sure, I could tweak the logger.  I was hoping to not have the stack trace
get logged, but a more user-friendly log generated.

On Fri, Jan 6, 2023 at 12:56 AM Claus Ibsen  wrote:

> Hi
>
> Do you want that WARN to not be logged - or the logging to NOT include the
> stacktrace?
> The log is hardcoded and it can happened when using temporary reply queues.
>
> You can tweak the logger to set logging level to ERROR
> for TemporaryQueueReplyManager etc
>
>
> On Thu, Jan 5, 2023 at 8:51 PM Mark Webb  wrote:
>
> > I'm starting up a project that will use the request/response with
> ActiveMQ
> > AMQP.  When I try to send a message that I expect a response to and
> > ActiveMQ is down, I can't seem to catch or prevent the stack trace from
> > getting logged for the TemporaryQueueReplyManager.  The error is:
> >
> > Exception inside the DMLC for Temporary ReplyTo Queue for destination
> ,
> > refreshing ReplyTo destination
> >
> > How can I go about handling this error in the temporary response
> > processing?  Any help would be appreciated.
> >
> > Thanks,
> > Mark
> >
>
>
> --
> Claus Ibsen
> -
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


elegant error handling with temporary replyTo ?

2023-01-05 Thread Mark Webb
I'm starting up a project that will use the request/response with ActiveMQ
AMQP.  When I try to send a message that I expect a response to and
ActiveMQ is down, I can't seem to catch or prevent the stack trace from
getting logged for the TemporaryQueueReplyManager.  The error is:

Exception inside the DMLC for Temporary ReplyTo Queue for destination ,
refreshing ReplyTo destination

How can I go about handling this error in the temporary response
processing?  Any help would be appreciated.

Thanks,
Mark


Re: camel-docker operation error

2022-12-22 Thread Mark Webb
I'd love to help you.  Thanks !!


On Thu, Dec 22, 2022 at 12:40 PM Claus Ibsen  wrote:

> Hi
>
> On Thu, Dec 22, 2022 at 6:37 PM Mark Webb  wrote:
>
> > Thanks Claus.  I started digging through the Java source code.  It
> appears
> > that only "stats" and "events" can be used by the Consumer, see
> > DockerEndpoint.createConsumer(Processor).  That's not clear in the
> > documentation.
> >
> >
> Ah yeah, good point. We can improve this. If you want to contribute, then
> you can send a PR where you update the javadoc setOperation method, where
> you can
> say that events and stats are only for the consumer, and all others for the
> producer.
>
>
>
>
> > On Thu, Dec 22, 2022 at 12:28 PM Claus Ibsen 
> > wrote:
> >
> > > Hi
> > >
> > > When browsing the documentation on the website, then make sure to
> select
> > > the Camel version you use, see bottom left corner.
> > >
> > > It may be that info is a new operation added in a newer version. If you
> > > choose the correct Camel version in the docs, then it should list what
> > > operations are valid.
> > >
> > > On Thu, Dec 22, 2022 at 6:14 PM Mark Webb 
> wrote:
> > >
> > > > I am trying to get a Camel-Docker route working.  The beginning of my
> > > > simple route is (I have a valid IP Address listed in the route):
> > > >
> > > > from("docker://info?host=IP_ADDRESS=2375").to("log:info");
> > > >
> > > > And I get the following error:
> > > >
> > > > *info is not a valid consumer operation*
> > > >
> > > > Are there any other tutorials or documentation I can look at to
> figure
> > > out
> > > > why the "info" operation is not valid?
> > > >
> > > > Thanks,
> > > > Mark
> > > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -
> > > @davsclaus
> > > Camel in Action 2: https://www.manning.com/ibsen2
> > >
> >
>
>
> --
> Claus Ibsen
> -
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: camel-docker operation error

2022-12-22 Thread Mark Webb
Thanks Claus.  I started digging through the Java source code.  It appears
that only "stats" and "events" can be used by the Consumer, see
DockerEndpoint.createConsumer(Processor).  That's not clear in the
documentation.

On Thu, Dec 22, 2022 at 12:28 PM Claus Ibsen  wrote:

> Hi
>
> When browsing the documentation on the website, then make sure to select
> the Camel version you use, see bottom left corner.
>
> It may be that info is a new operation added in a newer version. If you
> choose the correct Camel version in the docs, then it should list what
> operations are valid.
>
> On Thu, Dec 22, 2022 at 6:14 PM Mark Webb  wrote:
>
> > I am trying to get a Camel-Docker route working.  The beginning of my
> > simple route is (I have a valid IP Address listed in the route):
> >
> > from("docker://info?host=IP_ADDRESS=2375").to("log:info");
> >
> > And I get the following error:
> >
> > *info is not a valid consumer operation*
> >
> > Are there any other tutorials or documentation I can look at to figure
> out
> > why the "info" operation is not valid?
> >
> > Thanks,
> > Mark
> >
>
>
> --
> Claus Ibsen
> -
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


camel-docker operation error

2022-12-22 Thread Mark Webb
I am trying to get a Camel-Docker route working.  The beginning of my
simple route is (I have a valid IP Address listed in the route):

from("docker://info?host=IP_ADDRESS=2375").to("log:info");

And I get the following error:

*info is not a valid consumer operation*

Are there any other tutorials or documentation I can look at to figure out
why the "info" operation is not valid?

Thanks,
Mark


Re: Camels stop without warning

2015-03-31 Thread Mark Webb
Could you post your route definitions?


On Tue, Mar 31, 2015 at 12:57 AM, davedave nab...@scattered.com.au wrote:

 I'm running Camel (2.14.1) on ServiceMix (5.4.0), and have 21 routes across
 two bundles, including 11 timer producing endpoints.

 After around 10 hours (~1000 timer messages) of running, camel grinds to a
 halt, and only restarting the bundles resolves the issue. I have placed
 .log
 processors between each point in the route, and all running routes seems to
 halt at the same time (at various points in the route), with just a few
 rouge exchanges making it a few more hops over the following minutes. No
 more timers are fired, and in flight exchanges finish their current process
 but never make it to the next step in the route.

 There is nothing telltale in the logs, even set to DEBUG, everything just
 seems to stop, and I just get checkpoint debugs in the servicemix.log from
 activemq, until I restart the bundles. Once the bundles get the stop
 instruction, they actually begin routing again, but they also begin
 shutting
 down.

 I haven't tried running TRACE yet, as those 1000 messages get split in to
 many more thousands, and there'd be hundreds of megs of logs every minute
 being produced. And with it failing between 8 and 12 hours, there's a 4
 hour
 window where it would need to be watched closely.

 Connecting to the JMX port, I can't see and deadlocked threads.

 Any ideas on how best to best debug this?





 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camels-stop-without-warning-tp5765046.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Json Splitter

2015-03-26 Thread Mark Webb
Not that I've seen.  I've had the need for this in the past.  Would make a
nice new feature.

On Wed, Mar 25, 2015 at 3:09 AM, contactreji contactr...@gmail.com wrote:

 Hi

 Is there something out of the box in camel which can help me split json
 records?

 Regards
 Reji



 -
 Reji Mathews
 Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel
  Jboss Fuse ESB | Mule ESB )
 LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
 Twitter - reji_mathews
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Json-Splitter-tp5764739.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



REST DSL typo in webpage

2015-03-26 Thread Mark Webb
First off, thanks for this feature.  It rocks.  I've used it a few times
already.

Near the bottom of the page http://camel.apache.org/rest-dsl, there's a
typo in the section Enabling or disabling Jackson JSON features.   The
XML code snippet has a few errors:

1. bindingModel should be bindingMode
2. the value for bindingMode is missing a closing double-quote.


Re: REST DSL typo in webpage

2015-03-26 Thread Mark Webb
Will do.  I just checked any my account (from my MINA days) still works.

Thanks,
Mark


On Thu, Mar 26, 2015 at 11:03 AM, Taariq Levack taar...@gmail.com wrote:

 Fixed, thanks for reporting and please feel free to edit the site as you go
 along.

 On Thu, Mar 26, 2015 at 4:16 PM, Mark Webb elihusma...@gmail.com wrote:

  First off, thanks for this feature.  It rocks.  I've used it a few times
  already.
 
  Near the bottom of the page http://camel.apache.org/rest-dsl, there's a
  typo in the section Enabling or disabling Jackson JSON features.   The
  XML code snippet has a few errors:
 
  1. bindingModel should be bindingMode
  2. the value for bindingMode is missing a closing double-quote.
 



Re: Camel 2.12 : MongoDB - pre-existing indexes being dropped when using dynamicity

2015-02-18 Thread Mark Webb
I experienced this in 2.13.2 FWIW..


On Sat, Feb 14, 2015 at 4:43 AM, Sufod sufo...@gmail.com wrote:

 Hello,

 This is still happening on camel 2.14.1.

 Using dynamicity=true on MongoDb endpoint is running a dropIndexes on the
 specified collection (CamelMongoDbCollection header), for each exchange
 going through.

 Is this a known bug ?



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-2-12-MongoDB-pre-existing-indexes-being-dropped-when-using-dynamicity-tp5746575p5762718.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



camel-hbase dependency inconsistency

2014-11-18 Thread Mark Webb
Sorry for the cross-post, I'm not sure if this is a ServiceMix or Camel
problem.

I am working on some data routes that will push data to HBase within
ServiceMix.  My development environment depends on Apache Camel 2.13.2,
specifically the camel-hbase component version 2.13.2 depends on avro
1.5.3.  This is according to the dependency hierarchy that maven provides.
I only have camel-base version 2.13.2 listed in my pom.xml and maven pulls
in the dependencies.  I'm not specifically including avro.

When I deploy the camel-hbase feature in ServiceMix 5.1.2 I get an error
saying that I must deploy avro  = 1.7.7.  So it seems like the same
version of the camel-hbase component relies on 2 different versions of
avro: 1.5.3 for development and 1.7.7 for deployment within ServiceMix.

Is there any way to fix this problem?

Thanks,
Mark


custom netty decoder in OSGi

2014-10-22 Thread Mark Webb
I have created a custom netty decoder using Camel 2.13.2 in ServiceMix
5.1.2.  I would like to register the decoder as a service in ServiceMix.
All goes well, except that when I try and use the decoder in a separate
bundles blueprint, I get the error message:

14:21:21,830 | WARN  | mix-5.1.2/deploy | NettyConfiguration
| 214 - org.apache.camel.camel-netty - 2.13.2 | The decoder
com.x.y.z.MyFrameD
ecoder@1f2293f6 is not @Shareable or an ChannelHandlerFactory instance. The
decoder cannot safely be used.

I added the annotation @Sharable to the decoder and get the same error
message after redeploying.  I even tried creating a class that implements
ChannelHandlerFactory and got the same message.

Is there a better approach to get this working?

Thanks,
Mark


Re: custom converter to string (json, xml, csv)

2014-10-19 Thread Mark Webb
OK.  So how does one develop Camel support for a custom object getting
converted to a specified format?

On Fri, Oct 17, 2014 at 6:40 PM, Christian Müller 
christian.muel...@gmail.com wrote:

 You are looking for different data formats, not for different type
 converters.

 Best,
 Christian
 Am 17.10.2014 20:50 schrieb Mark Webb elihusma...@gmail.com:

  I have a custom object that I will be passing through Camel routes and
  there may be times where I want to convert the object to different
 formats,
  which means that I need to write custom converters.  My question is, how
 do
  I write a converter for the different String-based formats such as JSON,
  XML and CSV and have Camel be smart enough to choose the correct one?
 
  If I have the following methods
 
  @Converter
  public String myObjectToXml( MyObject event ){
  // do stuff here
  return xmljunk/xml;
  }
 
  @Converter
  public String myObjectToJson( MyObject event ){
  // do stuff here
  return {stuff:junk};
  }
 
  @Converter
  public String myObjectToCsv( MyObject event ){
  // do stuff here
  return junk,blah;
  }
 
  So I would marshal the object to a String-based format, but how does
 Camel
  know which one I want?
 



custom converter to string (json, xml, csv)

2014-10-17 Thread Mark Webb
I have a custom object that I will be passing through Camel routes and
there may be times where I want to convert the object to different formats,
which means that I need to write custom converters.  My question is, how do
I write a converter for the different String-based formats such as JSON,
XML and CSV and have Camel be smart enough to choose the correct one?

If I have the following methods

@Converter
public String myObjectToXml( MyObject event ){
// do stuff here
return xmljunk/xml;
}

@Converter
public String myObjectToJson( MyObject event ){
// do stuff here
return {stuff:junk};
}

@Converter
public String myObjectToCsv( MyObject event ){
// do stuff here
return junk,blah;
}

So I would marshal the object to a String-based format, but how does Camel
know which one I want?


Netty blueprint example

2014-10-10 Thread Mark Webb
I am working on creating an OSGI bundle that uses Netty to receive data
over a TCP connection.  I am stumped as to how and create a list of
decoders in the blueprint file.  I'm using ServiceMix 5.1.2 and I thought
I'd be able to do the following in the blueprint file :

util:list id=decoders list-class=java.util.LinkedList
ref bean=decoder1 /
ref bean=decoder2 /
/util:list

but I get XML schema errors with spring-util not being found up in
ServiceMix.  So I'm not sure if this is something I can solve with Camel,
or if this is a ServiceMix problem.  I am open to the possibility of doing
all this in a RouteBuilder class if that is a more viable solution.

Thanks for any help you can provide.


get solr response

2014-09-30 Thread Mark Webb
I am working on debugging my connection to solr.  I have set the body to an
instance of SolrInputDocument, yet nothing seems to be going into the solr
data store since all my queries return an empty set.  Is there a way I can
print the response that Camel receives from Solr so I can try and determine
what the problem may be?

Thank you.


Re: HTTP Unspecified length

2014-08-27 Thread Mark Webb
It will go on forever.  You connect, send a GET and it streams data to
you.

There are no headers sent.




On Wed, Aug 27, 2014 at 11:22 AM, Claus Ibsen claus.ib...@gmail.com wrote:

 How much data are we talking about, as you can get the data and then
 use the splitter.

 On Wed, Aug 27, 2014 at 5:12 PM, Mark Webb elihusma...@gmail.com wrote:
  I would like to pull data from a webserver has an unknown length.  I send
  the server a GET command and it sends data continuously, each record on a
  separate line.  I would like each record in a separate Camel exchange.
 Not
  sure if this is allowed in the HTTP spec, but the server does this.
 
  Is there a way to handle this using a Camel endpoint?  This could be done
  using a custom Netty handler, but I'd rather use and existing component.
 
  Thank you,
  Mark



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/



Re: HTTP Unspecified length

2014-08-27 Thread Mark Webb
As a bandaid approach, I'm using wget along with netcat to a Camel Netty
endpoint.  It's working for now :)


On Wed, Aug 27, 2014 at 1:50 PM, Peter Hicks peter.hi...@poggs.co.uk
wrote:

 Hi Mark


 On 27/08/14 16:12, Mark Webb wrote:

 I would like to pull data from a webserver has an unknown length.  I send
 the server a GET command and it sends data continuously, each record on a
 separate line.  I would like each record in a separate Camel exchange.
 Not
 sure if this is allowed in the HTTP spec, but the server does this.

 Is there a way to handle this using a Camel endpoint?  This could be done
 using a custom Netty handler, but I'd rather use and existing component.

 This appears similar to something I posted about a while ago at
 http://camel.465427.n5.nabble.com/Processing-data-from-a-
 long-lived-HTTP-streaming-URL-td5753758.html - but I never found a
 solution to it.


 Peter




Jetty consumer restricting methods

2012-08-07 Thread Mark Webb
I am using Jetty for a Camel consumer on a couple routes.  I would
like to limit only GET methods for one route and PUT for another
route.  Is this possible or do I need to set up some kind of
filter/processor to do this?  I don't see anything in the
documentation to support this functionality.

Thanks,
Mark


Re: running ActiveMQ with camel from maven

2012-06-18 Thread Mark Webb
I don't want this to be a strictly in-JVM broker.  I would like to
allow external clients to connect to ActiveMQ.  Ideally I would like
maven to start ActiveMQ, with my camel routes defined and referenced
from an activemq.xml file.



On Sun, Jun 17, 2012 at 11:28 PM, boday ben.o...@initekconsulting.com wrote:
 don't use the m2-amq plugin, instead just configure your test AMQ broker URL
 to be vm://localhost (generally configured with a test context file,
 /src/test/resources/camel-context.xml, etc.) and an embedded broker will be
 started automatically.


 Mark Webb wrote

 I usually use the command mvn camel:run to execute my camel
 routes..etc in my development environment.  I have included ActiveMQ
 support for my camel routing and would like to start an ActiveMQ
 broker as part of my Camel routes when they start up.  Is there a way
 to do this from maven or should I just embed a broker in my main
 class?

 I ran across this link -
 http://activemq.apache.org/maven2-activemq-broker-plugin.html, but it
 seems quite dated.


 Thanks,
 Mark



 -
 Ben O'Day
 IT Consultant -http://consulting-notes.com

 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/running-ActiveMQ-with-camel-from-maven-tp5714563p5714598.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


running ActiveMQ with camel from maven

2012-06-15 Thread Mark Webb
I usually use the command mvn camel:run to execute my camel
routes..etc in my development environment.  I have included ActiveMQ
support for my camel routing and would like to start an ActiveMQ
broker as part of my Camel routes when they start up.  Is there a way
to do this from maven or should I just embed a broker in my main
class?

I ran across this link -
http://activemq.apache.org/maven2-activemq-broker-plugin.html, but it
seems quite dated.


Thanks,
Mark


Re: file info lost in Exchange when passing through SEDA

2012-04-30 Thread Mark Webb
That was it.  I fell into the trap of using getOut().  Thank you.


On Mon, Apr 30, 2012 at 12:17 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Sounds like you do something wrong in your custom processor that
 removes the message body.
 See this FAQ
 http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

 On Mon, Apr 30, 2012 at 3:19 AM, Mark Webb elihusma...@gmail.com wrote:
 I have a couple routes set up, shown below:

        camel:route
                camel:from uri=file:data/dropdir?noop=true /
                camel:to uri=seda:analyzer /
        /camel:route

        camel:route
                camel:from uri=seda:analyzer /
                camel:process ref=FileDataProcessor /
                camel:choice
                        camel:when
                                camel:simple${in.header.status} == 
 'fail'/camel:simple
                                camel:to uri=file:data/failure /
                        /camel:when
                /camel:choice
        /camel:route

 I would like my FileDataProcessor bean to process the data that comes
 in to it, but the exchange is null.  I turned tracing on in the
 CamelContext and receive the following:

 [-1) thread #1 - file://data/dropdir] Tracer                      INFO
  myhost-62196-1335748044869-0-2  (route1)
 from(file://data/dropdir?noop=true) -- seda://analyzer 
 Pattern:InOnly, Headers:{CamelFileName=testdata.dat,
 breadcrumbId=myhost-62196-1335748044869-0-1,
 CamelFileParent=data/dropdir, CamelFileLastModified=Sun Apr 29
 21:07:33 EDT 2012, CamelFileAbsolute=false,
 CamelFilePath=data/dropdir/testdata.dat, CamelFileLength=151,
 CamelFileNameOnly=testdata.dat,
 CamelFileAbsolutePath=/Users/mark/workspace/CamelFileAnalyzer/data/dropdir/testdata.dat,
 CamelFileRelativePath=testdata.dat},
 BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is
 file based: GenericFile[testdata.dat]]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2) from(seda://analyzer) --
  Pattern:InOnly, Headers:{CamelFileRelativePath=testdata.dat,
 CamelFilePath=data/dropdir/testdata.dat, CamelFileLength=151,
 CamelFileNameOnly=testdata.dat, CamelFileParent=data/dropdir,
 CamelFileAbsolute=false, CamelFileLastModified=Sun Apr 29 21:07:33 EDT
 2012, 
 CamelFileAbsolutePath=/Users/mark/workspace/CamelFileAnalyzer/data/dropdir/testdata.dat,
 CamelFileName=testdata.dat,
 breadcrumbId=myhost-62196-1335748044869-0-1},
 BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is
 file based: GenericFile[testdata.dat]]
 [-1) thread #2 - seda://analyzer] FileDataProcessor   INFO  Exchange[null]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2)  -- choice 
 Pattern:InOnly, Headers:{status=pass}, BodyType:null, Body:[Body is
 null]
 [-1) thread #2 - seda://analyzer] Tracer                         INFO
 myhost-62196-1335748044869-0-3  (route2) choice -- choice 
 Pattern:InOnly, Headers:{status=pass}, BodyType:null, Body:[Body is
 null]


 Can File-based Exchanges not pass through SEDA destinations or
 something like that?

 Thanks,
 Mark



 --
 Claus Ibsen
 -
 CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/


Re: Apache Camel Netty

2012-03-16 Thread Mark Webb
I've been looking into this
(https://issues.apache.org/jira/browse/CAMEL-1077), it will require
large modifications to the existing netty component I believe.



On Fri, Mar 9, 2012 at 6:20 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Thu, Mar 8, 2012 at 10:59 PM, sambardar sanjay_ambar...@yahoo.com wrote:
 Yes, the issue was related to Context not up and now it works fine. I have a
 need to create a binary stream over the TCP connection. Means , in client
 server mode, I want to send a message to the server(that will run on a
 particular ip/port) over TCP socket to say start and then server should
 start streaming the binary data over the socket(and this would continue 24x7
 unless we re-start). After this client doesn't send anything to server but
 keep on receiving binary data from server over the socket. Is this
 achievable through Camel Netty component?


 No this is not possible to keep the connection live and receive data ad-hoc.
 There is some JIRA tickets to add such functionality.

 You can use the Netty API to build this yourself.


 Thanks
 Sanjay

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



 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/


running processors in different classloaders

2011-12-13 Thread Mark Webb
Does Camel support the ability to have processors run in separate
classloaders?  I have a system that will support 3rd party plug-ins
(processors).  This makes me want to separate the processors into
their own classloaders, similar to what Tomcat does with contexts.

Thanks,
Mark


bean as entry point

2011-10-19 Thread Mark Webb
I want to embed camel into an existing application in order to perform
some message routing.  The application processes data and I would like
this data to then enter a camel route.  The camel route will exist
in the same VM as the application that is processing the data.  What's
the easiest way to get the data into the route?

Thanks,
Mark


Re: bean as entry point

2011-10-19 Thread Mark Webb
I am looking at the pojo-producing documentation, and I don't see how
to inject the right information into my class.  I have this as a test
class:

import org.apache.camel.InOnly;
import org.apache.camel.Produce;

public class DummyPackageProducerBean {

@Produce(uri=seda:sendstuffhere)
protected DummyInterface producer;

public void whatever(){

producer.sendPackage(Hello World);
}
}

@InOnly
interface DummyInterface {

public void sendPackage( String name );
}

When I run my code which loads the camel context file using a
FileSystemXmlApplicationContext, I get the following exception:

Exception in thread main java.lang.NullPointerException
at 
com.xxx.camel.filter.engine.producer.DummyPackageProducerBean.whatever(DummyPackageProducerBean.java:13)
at com.xxx.camel.filter.engine.DemoRoutes.main(DemoRoutes.java:25)




On Wed, Oct 19, 2011 at 10:27 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Yeah for #1 in the bean (eg in your java code) you can inject a Camel
 ProducerTemplate
 http://camel.apache.org/producertemplate.html

 And then from one line of code send the message into Camel.

 You can also use annotations like @Produce as well
 http://camel.apache.org/pojo-producing.html

 See details here also
 http://camel.apache.org/bean-integration.html


 On Wed, Oct 19, 2011 at 4:12 PM, Mick Knutson mknut...@baselogic.com wrote:
 You could:


   1. Create a Bean that has a message Producer that sends a message to the
   route
   2. You could also use CXF and then you could also get data from outside
   your app in the future

 #1 is the simplest though.


 ---
 Thank You…

 Mick Knutson, President

 BASE Logic, Inc.
 Enterprise Architecture, Design, Mentoring  Agile Consulting
 p. (855) BASE-LOGIC: (227-3564-42)
 p. (478) BASE-LOGIC (227-3564-42)
 f. (855) BASE-LOGIC: (227-3564-42)

 Website: http://www.baselogic.com
 Blog: http://www.baselogic.com/blog/
 Linked IN: http://linkedin.com/in/mickknutson
 Twitter: http://twitter.com/mickknutson
 ---



 On Wed, Oct 19, 2011 at 10:09 AM, Mark Webb elihusma...@gmail.com wrote:

 I want to embed camel into an existing application in order to perform
 some message routing.  The application processes data and I would like
 this data to then enter a camel route.  The camel route will exist
 in the same VM as the application that is processing the data.  What's
 the easiest way to get the data into the route?

 Thanks,
 Mark





 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



auto-loading Groovy

2011-05-02 Thread Mark Webb
Is there a mechanism to auto-load, or auto-update a groovy script for
a Camel route at runtime?

I assume this is possible via a custom Processor, but did not want to
go ahead and build this if such functionality already exists.

Thanks,
Mark


WS-Notification

2011-04-29 Thread Mark Webb
I have a web service that will send out notifications when a specific
event occurs.  Does camel have the ability to accept and process
WS-Notification messages?

Thanks


Re: maven plugin

2011-04-07 Thread Mark Webb
I was using 2.6, but I tried 2.7 and its working fine.

Thanks,
Mark


On Thu, Apr 7, 2011 at 3:51 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 What version of Camel are you using?

 I have created a ticket to remove the DOT stuff
 https://issues.apache.org/jira/browse/CAMEL-3841



 On Mon, Apr 4, 2011 at 4:53 PM, Mark Webb elihusma...@gmail.com wrote:
 I am testing some routes and would like to create some sample routes
 to play with.  I am using maven to create these projects with the
 following command:

 mvn archetype:create -DgroupId=a.b.c.d -DartifactId=MyRouter
 -DarchetypeArtifactId=camel-router -DarchetypeGroupId=org.apache.camel

 This command works fine, I can run the command mvn package, and that
 runs fine.  I then try and run the command mvn camel:run and the
 command hangs, and this is the last line printed out:

 Apr 4, 2011 9:47:02 AM org.apache.camel.spring.Main generateDot
 INFO: Generating DOT file for routes:
 C:\temp\MyRouter\target/site/cameldoc for:
 org.apache.camel.spring.SpringCamelContext@622209db with name:
 camelContext

 Before running the command, I added in the following lines to the pom.xml 
 file:

 configuration
        useDotfalse/useDot
 /configuration

 I even tried to specify the path to dot.exe and got the same results.
 So is there any way I can run the camel route without running dot
 from maven?

 Thanks,
 Mark




 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 CamelOne 2011: http://fusesource.com/camelone2011/
 Twitter: davsclaus
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



maven plugin

2011-04-04 Thread Mark Webb
I am testing some routes and would like to create some sample routes
to play with.  I am using maven to create these projects with the
following command:

mvn archetype:create -DgroupId=a.b.c.d -DartifactId=MyRouter
-DarchetypeArtifactId=camel-router -DarchetypeGroupId=org.apache.camel

This command works fine, I can run the command mvn package, and that
runs fine.  I then try and run the command mvn camel:run and the
command hangs, and this is the last line printed out:

Apr 4, 2011 9:47:02 AM org.apache.camel.spring.Main generateDot
INFO: Generating DOT file for routes:
C:\temp\MyRouter\target/site/cameldoc for:
org.apache.camel.spring.SpringCamelContext@622209db with name:
camelContext

Before running the command, I added in the following lines to the pom.xml file:

configuration
useDotfalse/useDot
/configuration

I even tried to specify the path to dot.exe and got the same results.
So is there any way I can run the camel route without running dot
from maven?

Thanks,
Mark


polling database

2011-03-31 Thread Mark Webb
I want to create a route that will query a database for new rows
periodically.  If a new row is found I would like to put the
information from that row into the route for processing.  I have been
looking at the timer and quartz components and can't seem to get
either one to fit quite right with me requirement.

Is there another Camel component that will do this?  I have looked
through the Camel book and found ScheduledPollConsumer, but that just
looks like I would need to add in my own sleep.

I tried looking at the unit tests in
/camel/trunk/camel-camel/trunk/camel-core/src/test/java/org/apache/camel/component/timer
and could not find anything that fits either.

Any other suggestions?

Thanks,
Mark


Processor sending new message

2011-01-07 Thread Mark Webb
I have a processor that is handling messages and doing some metrics on
the messages.  If a certain threshold is hit I would like to send a
new message to a queue that subscribers can receive.  Is this
possible?

So for example, you have a processor that receives messages.  After
every 100 messages, the processor sends a new message to a subscriber
stating that 100 messages have been received.

Thanks,
Mark


hibernate and spring with camel

2010-11-24 Thread Mark Webb
I am looking to persist some data I receive in my processor to a
database using Spring and Hibernate.  Does anyone have experience
setting this up and maybe providing some tips on how to do it?  Right
now I have everything defined as spring beans in an XML file that is
imported from activemq.xml.  Problem is that if this file is
referenced from activemq.xml, how can I build a BeanFactory in order
to get at some of the beans, which in my case are DAO classes.

Thanks,
Mark


Re: hibernate and spring with camel

2010-11-24 Thread Mark Webb
Agree, but since ActiveMQ is importing the file from activemq.xml, I
can never be sure of its location.


On Wed, Nov 24, 2010 at 3:20 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 Is the XML file just a regular Spring XML file?

 I would assume you just do this as you would do using spring.

 On Wed, Nov 24, 2010 at 7:56 PM, Mark Webb elihusma...@gmail.com wrote:
 I am looking to persist some data I receive in my processor to a
 database using Spring and Hibernate.  Does anyone have experience
 setting this up and maybe providing some tips on how to do it?  Right
 now I have everything defined as spring beans in an XML file that is
 imported from activemq.xml.  Problem is that if this file is
 referenced from activemq.xml, how can I build a BeanFactory in order
 to get at some of the beans, which in my case are DAO classes.

 Thanks,
 Mark




 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



unit testing Spring XML route

2010-11-01 Thread Mark Webb
I have a route defined in XML that I want to unit test.  Is there a
way to do this?  I have found CamelSpringTestSupport, but I am not
sure that is what I want.  When I run a unit test that extends
CamelSpringTestSupport I get the following stack trace.

org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message: HELLO WORLD]
at 
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1156)
at 
org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:456)
at 
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:441)
at 
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:437)
at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:125)
at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:341)
at com.x.y.z.RecipientXmlTest.testTest(RecipientXmlTest.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.apache.camel.test.TestSupport.runBare(TestSupport.java:65)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.camel.CamelExchangeException: No consumers
available on endpoint: Endpoint[direct://start]. Exchange[Message:
HELLO WORLD]
at 
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:56)
at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)
at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)
at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
at 
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)
at 
org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:333)
at 
org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:303)
at 
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:208)
at 
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:303)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:154)
at 
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:110)
at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:123)
... 22 more


Re: unit testing Spring XML route

2010-11-01 Thread Mark Webb
Figured it out using the page http://camel.apache.org/testing.html and
section Spring Test with XML Config Example.


On Mon, Nov 1, 2010 at 4:16 PM, Mark Webb elihusma...@gmail.com wrote:
 I have a route defined in XML that I want to unit test.  Is there a
 way to do this?  I have found CamelSpringTestSupport, but I am not
 sure that is what I want.  When I run a unit test that extends
 CamelSpringTestSupport I get the following stack trace.

 org.apache.camel.CamelExecutionException: Exception occurred during
 execution on the exchange: Exchange[Message: HELLO WORLD]
        at 
 org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1156)
        at 
 org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:456)
        at 
 org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:441)
        at 
 org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:437)
        at 
 org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:125)
        at 
 org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:341)
        at com.x.y.z.RecipientXmlTest.testTest(RecipientXmlTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at org.apache.camel.test.TestSupport.runBare(TestSupport.java:65)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:243)
        at junit.framework.TestSuite.run(TestSuite.java:238)
        at 
 org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at 
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
        at 
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
 Caused by: org.apache.camel.CamelExchangeException: No consumers
 available on endpoint: Endpoint[direct://start]. Exchange[Message:
 HELLO WORLD]
        at 
 org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:56)
        at 
 org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)
        at 
 org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)
        at 
 org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
        at 
 org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)
        at 
 org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:333)
        at 
 org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:303)
        at 
 org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:208)
        at 
 org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:303)
        at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:154)
        at 
 org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:110)
        at 
 org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:123)
        ... 22 more



MINA component startup error

2010-10-27 Thread Mark Webb
I have the following route defined in an XML file:

route
from 
uri=mina:tcp://localhost:?decoderMaxLineLength=8192textline=truesync=false/
process ref=blah /
to uri=seda:junk /
/route

I am getting the following error on ActiveMQ startup.  I assume the
string is not properly escaped or something weird like that, but not
sure.



ERROR: java.lang.RuntimeException: Failed to execute start task.
Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 40 in XML document from URL [file:home/someguy/dev/camel.xml]
is invalid; nested exception is org.xml.sax.SAXParseException: The
reference to entity textline must end with the ';' delimiter.
java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 40 in XML document from URL [file:home/someguy/dev/camel.xml]
is invalid; nested exception is org.xml.sax.SAXParseException: The
reference to entity textline must end with the ';' delimiter.
at 
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
at 
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at 
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
at 
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at 
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
at org.apache.activemq.console.Main.main(Main.java:107)
Caused by: 
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 40 in XML document from URL [file:home/someguy/dev/camel.xml]
is invalid; nested exception is org.xml.sax.SAXParseException: The
reference to entity textline must end with the ';' delimiter.
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at 
org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.importBeanDefinitionResource(XBeanBeanDefinitionDocumentReader.java:120)
at 
org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseDefaultElement(XBeanBeanDefinitionDocumentReader.java:95)
at 
org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:81)
at 
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at 
org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at 
org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
at 
org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
at 
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at 
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at 

Re: MINA component startup error

2010-10-27 Thread Mark Webb
I ended up using the following XML to get things working.

bean id=myMinaFactory class=org.apache.camel.component.mina.MinaComponent
constructor-arg index=0 ref=case /
/bean

bean id=myMinaEndpoint
  factory-bean=myMinaFactory
  factory-method=createEndpoint
constructor-arg index=0 ref=myMinaConfig/
/bean

bean id=myMinaConfig
class=org.apache.camel.component.mina.MinaConfiguration
property name=protocol value=tcp /
property name=host value=0.0.0.0 /
property name=port value= /
property name=sync value=false /
property name=minaLogger value=false /
property name=textline value=true /
property name=decoderMaxLineLength value=8192 /
/bean

...
...
...

route
  from ref=myMinaEndpoint /
  process ref=blah /
  to uri=seda:junk /
/route



On Wed, Oct 27, 2010 at 3:30 PM, Mark Webb elihusma...@gmail.com wrote:
 I have the following route defined in an XML file:

        route
                from 
 uri=mina:tcp://localhost:?decoderMaxLineLength=8192textline=truesync=false/
                process ref=blah /
                to uri=seda:junk /
        /route

 I am getting the following error on ActiveMQ startup.  I assume the
 string is not properly escaped or something weird like that, but not
 sure.



 ERROR: java.lang.RuntimeException: Failed to execute start task.
 Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
 Line 40 in XML document from URL [file:home/someguy/dev/camel.xml]
 is invalid; nested exception is org.xml.sax.SAXParseException: The
 reference to entity textline must end with the ';' delimiter.
 java.lang.RuntimeException: Failed to execute start task. Reason:
 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
 Line 40 in XML document from URL [file:home/someguy/dev/camel.xml]
 is invalid; nested exception is org.xml.sax.SAXParseException: The
 reference to entity textline must end with the ';' delimiter.
        at 
 org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
        at 
 org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at 
 org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
        at 
 org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
        at 
 org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
        at org.apache.activemq.console.Main.main(Main.java:107)
 Caused by: 
 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
 Line 40 in XML document from URL [file:home/someguy/dev/camel.xml]
 is invalid; nested exception is org.xml.sax.SAXParseException: The
 reference to entity textline must end with the ';' delimiter.
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at 
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at 
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at 
 org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at 
 org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.importBeanDefinitionResource(XBeanBeanDefinitionDocumentReader.java:120)
        at 
 org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseDefaultElement(XBeanBeanDefinitionDocumentReader.java:95)
        at 
 org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:81)
        at 
 org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
        at 
 org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
        at 
 org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390

Re: 2 minor MINA bugs

2010-10-25 Thread Mark Webb
ActiveMQ 5.4.1

In conf/log4j.properties, I uncommented out the 2 lines they say to in
the comments:

# Or for more fine grained debug logging uncomment one of these
log4j.logger.org.apache.activemq=INFO
log4j.logger.org.apache.camel=INFO




On Sat, Oct 23, 2010 at 3:53 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Fri, Oct 22, 2010 at 8:13 PM, Mark Webb elihusma...@gmail.com wrote:
 With the default ActiveMQ configuration, that stack trace is not sent
 to the console.  So if people send text messages longer than 1024
 characters to ActiveMQ the messages will not get processed and there
 will be no log entry as to why.


 What AMQ version?

 And maybe you can post the default configuration from AMQ which
 doesn't print the stacktrace?
 I would be surprised if it suppress WARN logs.




 On Thu, Oct 21, 2010 at 1:36 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 So are you saying that you dont notice the WARN? That is a really high 
 level.


 On Thu, Oct 21, 2010 at 6:15 PM, Mark Webb elihusma...@gmail.com wrote:
 Here is the stack trace.  It is a WARN, not DEBUG.  Sorry about that.

 I cut out the Hexdump dump for brevity.

  WARN | [/127.0.0.1:53690] Unexpected exception from exceptionCaught 
 handler.
 org.apache.camel.CamelException:
 org.apache.mina.filter.codec.ProtocolDecoderException:
 org.apache.mina.common.BufferDataException: Line is too long: 1973
 (Hexdump: 5C 3D 0D 0A)
        at 
 org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.exceptionCaught(MinaConsumer.java:91)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
        at 
 org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)
        at 
 org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
        at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
 Caused by: org.apache.mina.filter.codec.ProtocolDecoderException:
 org.apache.mina.common.BufferDataException: Line is too long: 1973
 (Hexdump: 5C 3D 0D 0A)
        at 
 org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived(AbstractIoFilterChain.java:499)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:293)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:228)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
        at 
 org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
        ... 3 more
 Caused by: org.apache.mina.common.BufferDataException: Line is too long: 
 1973
        at 
 org.apache.mina.filter.codec.textline.TextLineDecoder.decodeAuto(TextLineDecoder.java:188)
        at 
 org.apache.mina.filter.codec.textline.TextLineDecoder.decode(TextLineDecoder.java:112)
        at 
 org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158)
        ... 14 more


 On Thu, Oct 21, 2010 at 10:14 AM, Claus Ibsen claus.ib...@gmail.com 
 wrote:
 On Thu, Oct 21, 2010 at 3:33 PM, Mark Webb elihusma...@gmail.com wrote:
 First off, thanks for the work.  The more I use Camel, the more I love
 it.  Here are 2 'bugs' I have run across:

 1. On the page http://camel.apache.org/mina.html, for the list of
 configuration parameters you list decorderMaxLineLength, this is a
 typo and should be decoderMaxLineLength.  I copy and pasted the word
 into my code and took me a few minutes to find the problem.


 Fixed the typo.


 2. Secondly, I am sending long lines of data to the Camel

manage Camel Processor using JMX

2010-10-25 Thread Mark Webb
I have gone through the camel site, and the Camel In Action book
trying to find the solution to this.  I want to expose a custom
processor that I wrote via JMX.  The processor implements
org.apache.camel.Processor.  It appears that the Processor interface
is not the right solution.  I see that there is a
org.apache.camel.management.mbean.ManagedProcessor class, but it
requires a Processor to be passed into it, which confuses me a little.

There must be another way to go about this and I hope someone here can help me.

Thanks,
Mark


Re: manage Camel Processor using JMX

2010-10-25 Thread Mark Webb
Yes, I needed to implement Service.  Now, how can I get methods
specific to a processor to show up in JMX?  I am using the JMX
annotations (ManagedResource, ManagedOperation, ManagedAttribute) but
nothing shows up in jconsole.



On Mon, Oct 25, 2010 at 9:59 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 I think you need to implement Service to have it managed.

 See this FAQ
 http://camel.apache.org/why-is-my-processor-not-showing-up-in-jconsole.html

 On Mon, Oct 25, 2010 at 3:56 PM, Mark Webb elihusma...@gmail.com wrote:
 I have gone through the camel site, and the Camel In Action book
 trying to find the solution to this.  I want to expose a custom
 processor that I wrote via JMX.  The processor implements
 org.apache.camel.Processor.  It appears that the Processor interface
 is not the right solution.  I see that there is a
 org.apache.camel.management.mbean.ManagedProcessor class, but it
 requires a Processor to be passed into it, which confuses me a little.

 There must be another way to go about this and I hope someone here can help 
 me.

 Thanks,
 Mark




 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



Re: manage Camel Processor using JMX

2010-10-25 Thread Mark Webb
Nothing shows up in jconsole now.  Is there an example that will explain this?


On Mon, Oct 25, 2010 at 11:31 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Try implementing ManagementAware and return this from the method.



 On Mon, Oct 25, 2010 at 5:05 PM, Mark Webb elihusma...@gmail.com wrote:
 Yes, I needed to implement Service.  Now, how can I get methods
 specific to a processor to show up in JMX?  I am using the JMX
 annotations (ManagedResource, ManagedOperation, ManagedAttribute) but
 nothing shows up in jconsole.



 On Mon, Oct 25, 2010 at 9:59 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 I think you need to implement Service to have it managed.

 See this FAQ
 http://camel.apache.org/why-is-my-processor-not-showing-up-in-jconsole.html

 On Mon, Oct 25, 2010 at 3:56 PM, Mark Webb elihusma...@gmail.com wrote:
 I have gone through the camel site, and the Camel In Action book
 trying to find the solution to this.  I want to expose a custom
 processor that I wrote via JMX.  The processor implements
 org.apache.camel.Processor.  It appears that the Processor interface
 is not the right solution.  I see that there is a
 org.apache.camel.management.mbean.ManagedProcessor class, but it
 requires a Processor to be passed into it, which confuses me a little.

 There must be another way to go about this and I hope someone here can 
 help me.

 Thanks,
 Mark




 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/





 --
 Claus Ibsen
 -
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



Re: 2 minor MINA bugs

2010-10-25 Thread Mark Webb
INFO does not make sense.  WARN seems better to me.


On Mon, Oct 25, 2010 at 11:47 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 I have created a ticket
 https://issues.apache.org/activemq/browse/AMQ-2997

 On Mon, Oct 25, 2010 at 5:41 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Yeah the default log4j.properties in AMQ is ERROR for Camel
 https://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/log4j.properties

 I will raise a ticket to lower that to WARN or maybe even INFO if that
 makes more sense.


 On Mon, Oct 25, 2010 at 3:36 PM, Mark Webb elihusma...@gmail.com wrote:
 ActiveMQ 5.4.1

 In conf/log4j.properties, I uncommented out the 2 lines they say to in
 the comments:

 # Or for more fine grained debug logging uncomment one of these
 log4j.logger.org.apache.activemq=INFO
 log4j.logger.org.apache.camel=INFO




 On Sat, Oct 23, 2010 at 3:53 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Fri, Oct 22, 2010 at 8:13 PM, Mark Webb elihusma...@gmail.com wrote:
 With the default ActiveMQ configuration, that stack trace is not sent
 to the console.  So if people send text messages longer than 1024
 characters to ActiveMQ the messages will not get processed and there
 will be no log entry as to why.


 What AMQ version?

 And maybe you can post the default configuration from AMQ which
 doesn't print the stacktrace?
 I would be surprised if it suppress WARN logs.




 On Thu, Oct 21, 2010 at 1:36 PM, Claus Ibsen claus.ib...@gmail.com 
 wrote:
 So are you saying that you dont notice the WARN? That is a really high 
 level.


 On Thu, Oct 21, 2010 at 6:15 PM, Mark Webb elihusma...@gmail.com wrote:
 Here is the stack trace.  It is a WARN, not DEBUG.  Sorry about that.

 I cut out the Hexdump dump for brevity.

  WARN | [/127.0.0.1:53690] Unexpected exception from exceptionCaught 
 handler.
 org.apache.camel.CamelException:
 org.apache.mina.filter.codec.ProtocolDecoderException:
 org.apache.mina.common.BufferDataException: Line is too long: 1973
 (Hexdump: 5C 3D 0D 0A)
        at 
 org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.exceptionCaught(MinaConsumer.java:91)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
        at 
 org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)
        at 
 org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
        at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
 Caused by: org.apache.mina.filter.codec.ProtocolDecoderException:
 org.apache.mina.common.BufferDataException: Line is too long: 1973
 (Hexdump: 5C 3D 0D 0A)
        at 
 org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived(AbstractIoFilterChain.java:499)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:293)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:228)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
        at 
 org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
        ... 3 more
 Caused by: org.apache.mina.common.BufferDataException: Line is too 
 long: 1973
        at 
 org.apache.mina.filter.codec.textline.TextLineDecoder.decodeAuto(TextLineDecoder.java:188)
        at 
 org.apache.mina.filter.codec.textline.TextLineDecoder.decode(TextLineDecoder.java:112)
        at 
 org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158)
        ... 14 more

Re: 2 minor MINA bugs

2010-10-22 Thread Mark Webb
With the default ActiveMQ configuration, that stack trace is not sent
to the console.  So if people send text messages longer than 1024
characters to ActiveMQ the messages will not get processed and there
will be no log entry as to why.


On Thu, Oct 21, 2010 at 1:36 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 So are you saying that you dont notice the WARN? That is a really high level.


 On Thu, Oct 21, 2010 at 6:15 PM, Mark Webb elihusma...@gmail.com wrote:
 Here is the stack trace.  It is a WARN, not DEBUG.  Sorry about that.

 I cut out the Hexdump dump for brevity.

  WARN | [/127.0.0.1:53690] Unexpected exception from exceptionCaught handler.
 org.apache.camel.CamelException:
 org.apache.mina.filter.codec.ProtocolDecoderException:
 org.apache.mina.common.BufferDataException: Line is too long: 1973
 (Hexdump: 5C 3D 0D 0A)
        at 
 org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.exceptionCaught(MinaConsumer.java:91)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
        at 
 org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)
        at 
 org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
        at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
 Caused by: org.apache.mina.filter.codec.ProtocolDecoderException:
 org.apache.mina.common.BufferDataException: Line is too long: 1973
 (Hexdump: 5C 3D 0D 0A)
        at 
 org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived(AbstractIoFilterChain.java:499)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
        at 
 org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:293)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:228)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
        at 
 org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
        at 
 org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
        ... 3 more
 Caused by: org.apache.mina.common.BufferDataException: Line is too long: 1973
        at 
 org.apache.mina.filter.codec.textline.TextLineDecoder.decodeAuto(TextLineDecoder.java:188)
        at 
 org.apache.mina.filter.codec.textline.TextLineDecoder.decode(TextLineDecoder.java:112)
        at 
 org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158)
        ... 14 more


 On Thu, Oct 21, 2010 at 10:14 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Thu, Oct 21, 2010 at 3:33 PM, Mark Webb elihusma...@gmail.com wrote:
 First off, thanks for the work.  The more I use Camel, the more I love
 it.  Here are 2 'bugs' I have run across:

 1. On the page http://camel.apache.org/mina.html, for the list of
 configuration parameters you list decorderMaxLineLength, this is a
 typo and should be decoderMaxLineLength.  I copy and pasted the word
 into my code and took me a few minutes to find the problem.


 Fixed the typo.


 2. Secondly, I am sending long lines of data to the Camel-MINA
 component and needed to increase the decoderMaxLineLength.  Until I
 bumped the ActiveMQ log4j.properties file to ALL, I did not see the
 exception that stated the line was too long.  Shouldn't this exception
 be logged as an error?  If so I would have seen it sooner.  IIRC right
 now the exception is logged as a DEBUG.


 Can you post the stacktrace?


 Thank you,
 Mark




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com

2 minor MINA bugs

2010-10-21 Thread Mark Webb
First off, thanks for the work.  The more I use Camel, the more I love
it.  Here are 2 'bugs' I have run across:

1. On the page http://camel.apache.org/mina.html, for the list of
configuration parameters you list decorderMaxLineLength, this is a
typo and should be decoderMaxLineLength.  I copy and pasted the word
into my code and took me a few minutes to find the problem.

2. Secondly, I am sending long lines of data to the Camel-MINA
component and needed to increase the decoderMaxLineLength.  Until I
bumped the ActiveMQ log4j.properties file to ALL, I did not see the
exception that stated the line was too long.  Shouldn't this exception
be logged as an error?  If so I would have seen it sooner.  IIRC right
now the exception is logged as a DEBUG.

Thank you,
Mark


Re: 2 minor MINA bugs

2010-10-21 Thread Mark Webb
Here is the stack trace.  It is a WARN, not DEBUG.  Sorry about that.

I cut out the Hexdump dump for brevity.

 WARN | [/127.0.0.1:53690] Unexpected exception from exceptionCaught handler.
org.apache.camel.CamelException:
org.apache.mina.filter.codec.ProtocolDecoderException:
org.apache.mina.common.BufferDataException: Line is too long: 1973
(Hexdump: 5C 3D 0D 0A)
at 
org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.exceptionCaught(MinaConsumer.java:91)
at 
org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)
at 
org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
at 
org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
at 
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
at 
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)
at 
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.mina.filter.codec.ProtocolDecoderException:
org.apache.mina.common.BufferDataException: Line is too long: 1973
(Hexdump: 5C 3D 0D 0A)
at 
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165)
at 
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at 
org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
at 
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at 
org.apache.mina.common.support.AbstractIoFilterChain$HeadFilter.messageReceived(AbstractIoFilterChain.java:499)
at 
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
at 
org.apache.mina.common.support.AbstractIoFilterChain.fireMessageReceived(AbstractIoFilterChain.java:293)
at 
org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:228)
at 
org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
at 
org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
at 
org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
at 
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
... 3 more
Caused by: org.apache.mina.common.BufferDataException: Line is too long: 1973
at 
org.apache.mina.filter.codec.textline.TextLineDecoder.decodeAuto(TextLineDecoder.java:188)
at 
org.apache.mina.filter.codec.textline.TextLineDecoder.decode(TextLineDecoder.java:112)
at 
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158)
... 14 more


On Thu, Oct 21, 2010 at 10:14 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Thu, Oct 21, 2010 at 3:33 PM, Mark Webb elihusma...@gmail.com wrote:
 First off, thanks for the work.  The more I use Camel, the more I love
 it.  Here are 2 'bugs' I have run across:

 1. On the page http://camel.apache.org/mina.html, for the list of
 configuration parameters you list decorderMaxLineLength, this is a
 typo and should be decoderMaxLineLength.  I copy and pasted the word
 into my code and took me a few minutes to find the problem.


 Fixed the typo.


 2. Secondly, I am sending long lines of data to the Camel-MINA
 component and needed to increase the decoderMaxLineLength.  Until I
 bumped the ActiveMQ log4j.properties file to ALL, I did not see the
 exception that stated the line was too long.  Shouldn't this exception
 be logged as an error?  If so I would have seen it sooner.  IIRC right
 now the exception is logged as a DEBUG.


 Can you post the stacktrace?


 Thank you,
 Mark




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



Re: Giving anonymous processors an identity - is there an annoation for that?

2010-10-18 Thread Mark Webb
will this work with the camel:dot task in maven?  If you do not
override the toString() method in your org.apache.camel.Processor, the
text in the output .png file just shows as a class instance string.



On Sat, Oct 9, 2010 at 2:03 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 Hi

 Its a known issue with the tracer when it gets a bit more complex when
 using interceptors etc.
 Its listed in the known issue section in the release notes.
 And we got a couple of JIRA tickets about this.

 A rework on internals in Camel 3 should help us make this work better
 than we currently can do in 2.x.


 On Fri, Oct 8, 2010 at 11:22 PM, Christian Müller
 christian.muel...@gmail.com wrote:
 Hello Claus, hello Ade!

 I modified the test a bit on my machine. I added the following two lines to
 enable the default tracer:

 {code:java}
                context.setTracing(true);
                context.getInterceptStrategies().add(new Tracer());
 {code}

 I received the following log statements:

 {code}
 2010-10-08 23:13:14,164 [main           ] INFO
 Tracer                         -
 ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2  (foo)
 from(direct://start) -- log://foo  Pattern:InOnly, BodyType:String,
 Body:Hello World
 2010-10-08 23:13:14,165 [main           ] INFO
 foo                            - Exchange[ExchangePattern:InOnly,
 BodyType:String, Body:Hello World]
 2010-10-08 23:13:14,168 [main           ] INFO
 Tracer                         -
 ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2  (foo)
 log://foo -- 
 org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82
 Pattern:InOnly, BodyType:String, Body:Hello World
 2010-10-08 23:13:14,169 [main           ] INFO
 Tracer                         -
 ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2  (foo)
 org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 --
 mock://result  Pattern:InOnly, Headers:{foo=123}, BodyType:String,
 Body:Hello World
 {code}

 That's not what we want, is it? Instead of log://foo --
 org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 I expected
 log -- inlined.

 Have a nice weekend,
 Christian

 P.S. Looking forward to the FUSE community day in Paris.




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



Re: message not getting delivered

2010-10-04 Thread Mark Webb
Thanks.  I have things working now.

It seems weird to me though that if in a Processor I take a message
in, transform it into a newly created Message object that I should
call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
think of a Processor as taking in a message and then sending it
out, but it looks like that is not the case.  Just need to adjust
the way I think about things.



On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 See this FAQ
 http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

 On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb elihusma...@gmail.com wrote:
 I am sending messages through a Camel route in ActiveMQ.  My message
 reaches the end of the processing chain, and at the last processor I
 call exchange.setOut( newly created DefaultMessage ).  When I look at
 the admin page for ActiveMQ, the topic shows that there is a message
 to be dequeued.  It even says that there is a consumer connected to
 that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
 Consumer.setMessageListener.  So why are the messages not making their
 way to my GUI tool?  I am stumped as to why the messages sit in the
 topic and never leave if there is a listener for that topic.

 Of course the first thought is, is the Connection started?  Yeah I
 verified that.  In fact I can send messages to the topic via the
 web-based admin tool for ActiveMQ and the GUI receives them.

 Thanks for any help you have,
 Mark




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



Re: message not getting delivered

2010-10-04 Thread Mark Webb
I agree. But when producing an out I think you need to call
Exchange.setIn(Message).  Seems like when you call
Exchange.setOut(Message) you are setting up a request-reply scenario
which is not what I wanted.


On Mon, Oct 4, 2010 at 1:54 PM, Hadrian Zbarcea hzbar...@gmail.com wrote:
 Yeah, there is still a lot of confusion.
 Unfortunately that page is bollocks and I'll have to get it cleaned up.
 Mark, I think you did the right thing actually, in a processor one should 
 *not* modify the in, but produce an out, if needed. It's time to get that 
 clarified!

 My $0.02,
 Hadrian

 On Oct 4, 2010, at 10:01 AM, Claus Ibsen wrote:

 On Mon, Oct 4, 2010 at 3:57 PM, Mark Webb elihusma...@gmail.com wrote:
 Thanks.  I have things working now.

 It seems weird to me though that if in a Processor I take a message
 in, transform it into a newly created Message object that I should
 call Exchange.setIn(Message) instead of Exchange.setOut(Message).  I
 think of a Processor as taking in a message and then sending it
 out, but it looks like that is not the case.  Just need to adjust
 the way I think about things.


 You are not the only one. See this FAQ
 http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html



 On Sat, Oct 2, 2010 at 3:06 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 See this FAQ
 http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

 On Fri, Oct 1, 2010 at 10:37 PM, Mark Webb elihusma...@gmail.com wrote:
 I am sending messages through a Camel route in ActiveMQ.  My message
 reaches the end of the processing chain, and at the last processor I
 call exchange.setOut( newly created DefaultMessage ).  When I look at
 the admin page for ActiveMQ, the topic shows that there is a message
 to be dequeued.  It even says that there is a consumer connected to
 that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
 Consumer.setMessageListener.  So why are the messages not making their
 way to my GUI tool?  I am stumped as to why the messages sit in the
 topic and never leave if there is a listener for that topic.

 Of course the first thought is, is the Connection started?  Yeah I
 verified that.  In fact I can send messages to the topic via the
 web-based admin tool for ActiveMQ and the GUI receives them.

 Thanks for any help you have,
 Mark




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus





 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus




message losing headers

2010-10-01 Thread Mark Webb
I am passing a message through a series of Processors and in the
course of this processing I am setting header information in the
Message objects.  I have run into a problem where after setting a
header value in one Processor, the next Processor in the routing does
not see it.  I have run through steps to try and determine what is
going on, and cannot figure it out.  I am using ActiveMQ 5.4.1 and
Camel 2.4.0.

Thanks


Re: message losing headers

2010-10-01 Thread Mark Webb
They are just strings.  Seems like once I changed the destinations
from queues to direct:whatever the header information started
carrying over.  Must be once the message leaves Camel the header
information is gone.

Thanks for the help


On Fri, Oct 1, 2010 at 4:17 PM, Stephen Gargan steve.gar...@gmail.com wrote:
 You may want to read the Notes section in the JMS Component where is
 describes valid headers.

 http://camel.apache.org/jms.html

 Check that you have no '-' or the like in the header names. What do
 the dropped headers look like?

 thx

 ste

 On Fri, Oct 1, 2010 at 12:46 PM, Mark Webb elihusma...@gmail.com wrote:
 I am passing a message through a series of Processors and in the
 course of this processing I am setting header information in the
 Message objects.  I have run into a problem where after setting a
 header value in one Processor, the next Processor in the routing does
 not see it.  I have run through steps to try and determine what is
 going on, and cannot figure it out.  I am using ActiveMQ 5.4.1 and
 Camel 2.4.0.

 Thanks




message not getting delivered

2010-10-01 Thread Mark Webb
I am sending messages through a Camel route in ActiveMQ.  My message
reaches the end of the processing chain, and at the last processor I
call exchange.setOut( newly created DefaultMessage ).  When I look at
the admin page for ActiveMQ, the topic shows that there is a message
to be dequeued.  It even says that there is a consumer connected to
that topic, which is a GUI tool I wrote.  The GUI tool makes a call to
Consumer.setMessageListener.  So why are the messages not making their
way to my GUI tool?  I am stumped as to why the messages sit in the
topic and never leave if there is a listener for that topic.

Of course the first thought is, is the Connection started?  Yeah I
verified that.  In fact I can send messages to the topic via the
web-based admin tool for ActiveMQ and the GUI receives them.

Thanks for any help you have,
Mark


problem using MINA endpoint

2010-09-27 Thread Mark Webb
I am working to set up Camel to receive data on a MINA endpoint.  I
have the following statement in my camel XML file:

route
from uri=mina:tcp://localhost:?textline=true/
to uri=jms:topic:mina.topic /
/route

When I start up ActiveMQ, I get the following:

Failed to execute main task. Reason: java.lang.NoSuchMethodError:
org.apache.camel.CamelContext.getExecutorServiceStrategy()Lorg/apache/camel/spi/ExecutorServiceStrategy;



Where am I going wrong?  Is this the proper way to set this up, or am
I doing something else wrong?

Thanks,
Mark


Re: problem using MINA endpoint

2010-09-27 Thread Mark Webb
that was the problem.  I was still using ActiveMQ 5.3.2 which is using
Camel 2.2.0.

Thanks


On Mon, Sep 27, 2010 at 11:54 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Mon, Sep 27, 2010 at 5:47 PM, Mark Webb elihusma...@gmail.com wrote:
 I am working to set up Camel to receive data on a MINA endpoint.  I
 have the following statement in my camel XML file:

        route
                from uri=mina:tcp://localhost:?textline=true/
                to uri=jms:topic:mina.topic /
        /route

 When I start up ActiveMQ, I get the following:

 Failed to execute main task. Reason: java.lang.NoSuchMethodError:
 org.apache.camel.CamelContext.getExecutorServiceStrategy()Lorg/apache/camel/spi/ExecutorServiceStrategy;



 Where am I going wrong?  Is this the proper way to set this up, or am
 I doing something else wrong?


 You may have mixed versions of Camel in the classpath. Make sure they
 are all from the same version.


 Thanks,
 Mark




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



putting value in Camel Registry

2010-09-27 Thread Mark Webb
I am stumped as to how to place an object reference into the Camel
registry.  I have defined my route in Java DSL and cannot figure out
how to put data into the Registry.  I am trying to use the MINA
endpoint and want to use a custom protocol factory.  I have read
through Camel In Action section 7.5.2, yet it does not explain how to
set the codec in the Registry.  Maybe this is more of a java issue
that I am not familiar with how to do this, but the book does not seem
straight-forward.

Thanks,
Mark


Re: putting value in Camel Registry

2010-09-27 Thread Mark Webb
That is exactly what I was looking for.

Thank you,
Mark


On Mon, Sep 27, 2010 at 2:49 PM, Daniel Bevenius
daniel.beven...@gmail.com wrote:
 Hi,

 did you also take a look at chapter 4.3 Camel's bean registries that
 discusses the registries? It goes through how to bind stuff to the different
 types of registries.

 Regards,

 /Daniel


 2010/9/27 Mark Webb elihusma...@gmail.com

 I am stumped as to how to place an object reference into the Camel
 registry.  I have defined my route in Java DSL and cannot figure out
 how to put data into the Registry.  I am trying to use the MINA
 endpoint and want to use a custom protocol factory.  I have read
 through Camel In Action section 7.5.2, yet it does not explain how to
 set the codec in the Registry.  Maybe this is more of a java issue
 that I am not familiar with how to do this, but the book does not seem
 straight-forward.

 Thanks,
 Mark




GUI route builder

2010-09-14 Thread Mark Webb
I imagine such a thing exists, but I can't find one.  Is there a GUI
tool, or possibly IDE plugin that allows you to visually create routes
in Camel?


Queue full

2010-08-26 Thread Mark Webb
I am getting an error in ActiveMQ as I test my routes.  I am sending
messages at a rate of about 1 every 10ms.  I am getting the following
error:

2010-08-26 15:41:13,937 | ERROR | Failed delivery for exchangeId:
767c7514-b6ae-49fb-805a-78b13a0425af. Exhausted after delivery
attempt: 1 caught: java.lang.IllegalStateException: Queue full |
org.apache.camel.processor.DefaultErrorHandler | Camel thread 0:
seda://xyzabc
java.lang.IllegalStateException: Queue full
at java.util.AbstractQueue.add(AbstractQueue.java:71)
at 
org.apache.camel.component.seda.SedaProducer.process(SedaProducer.java:96)
at 
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)


How can I increase the capacity of the queue(s) that Camel is using?

Thanks


JMS Message header getting lost

2010-08-25 Thread Mark Webb
I am sending data through ActiveMQ and Camel.  I set a property value
in the TextMessage object prior to sending to ActiveMQ.  The property
value I sent prior to sending to ActiveMQ is gone when I receive the
message on the other side.  How can I prevent this from happening?


Re: JMS Message header getting lost

2010-08-25 Thread Mark Webb
I think I figured it out.  I have a processor in which I am creating a
new message to pass along.  I need to set the headers in the new
message with the headers from the old message.  Is that the proper way
to copy over message properties?



On Wed, Aug 25, 2010 at 4:41 PM, Mark Webb elihusma...@gmail.com wrote:
 I am sending data through ActiveMQ and Camel.  I set a property value
 in the TextMessage object prior to sending to ActiveMQ.  The property
 value I sent prior to sending to ActiveMQ is gone when I receive the
 message on the other side.  How can I prevent this from happening?



Re: content based routing based on header value

2010-08-12 Thread Mark Webb
I see that the latest MEAP of Camel In Action answers this question in
the first page of Appendix A.

On Tue, Aug 10, 2010 at 11:56 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Tue, Aug 10, 2010 at 5:42 PM, Mark Webb elihusma...@gmail.com wrote:
 I am setting up a route in XML and want to send messages to a
 destination based on a field in the header.  I have the following:

 log message=Analyzed [${body}] with destination -- ${header.dest}/
                choice
                        when
                                header'${header.dest}' = 'stuff'/header
                                to uri=jms:somewhere /
                        /when
                /choice

 As I test this the log gives me the correct information for
 ${header.dest} and that being stuff, but I do not know how to test
 the value in order to send the message to the proper location.  What
 is the proper syntax here?  I looked through the Camel in Action book
 and the camel website and cannot find anything.


 The header will only grab a header. It's not a scripting language to
 evaluate expressions/predicates etc.

 For that you can use any of the more powerful languages
 http://camel.apache.org/languages.html

 For example you can use the built in simple language
 http://camel.apache.org/simple.html

 Which is being explained in the appendix A of the Camel book (avail in
 next MEAP update).

 simple${header.dest} == 'stuff'/simple


 Thanks,
 Mark




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



Re: request / response example

2010-08-12 Thread Mark Webb
OK, cool.  I got that to work.  Now what about the case in which I do
not want to set the JMSReplyTo header field?  How would that work?

Thanks for the help



On Wed, Aug 11, 2010 at 4:51 PM, Claus Ibsen claus.ib...@gmail.com wrote:
 If the JMS message has a JMSReplyTo header then the JMS consumer will
 use request/reply automatically.
 http://camel.apache.org/request-reply.html

 So you route should simply just be:

  route
         from uri=jms:queue.A /
         process ref=processor /
  /route

 So when the route ends, the consumer jms:queue.A will send the reply
 back the the queue defined in the JMSReplyTo header.


 On Wed, Aug 11, 2010 at 8:45 PM, Mark Webb elihusma...@gmail.com wrote:
 I am trying to figure out how to set up a request / response in Camel
 with ActiveMQ.  Basically this is what I am looking for:


 myapp - queue.A - processor(DB query) - queue.A - myapp


 I have read through the documentation and the closest I have come is
 the following sping-camel example:

 route
        from uri=jms:queue.A /
        process ref=processor /
        to uri=jms:queue.A pattern=InOut /
 /route

 This seems to work, but it doesn't seem right to me that I need a
 from and to.  Plus I get a
 org.apache.camel.ExchangeTimedOutException: exception on each message.


 Thanks for any help you have,
 Mark




 --
 Claus Ibsen
 Apache Camel Committer

 Author of Camel in Action: http://www.manning.com/ibsen/
 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/
 Twitter: http://twitter.com/davsclaus



request / response example

2010-08-11 Thread Mark Webb
I am trying to figure out how to set up a request / response in Camel
with ActiveMQ.  Basically this is what I am looking for:


myapp - queue.A - processor(DB query) - queue.A - myapp


I have read through the documentation and the closest I have come is
the following sping-camel example:

route
from uri=jms:queue.A /
process ref=processor /
to uri=jms:queue.A pattern=InOut /
/route

This seems to work, but it doesn't seem right to me that I need a
from and to.  Plus I get a
org.apache.camel.ExchangeTimedOutException: exception on each message.


Thanks for any help you have,
Mark


content based routing based on header value

2010-08-10 Thread Mark Webb
I am setting up a route in XML and want to send messages to a
destination based on a field in the header.  I have the following:

log message=Analyzed [${body}] with destination -- ${header.dest}/
choice
when
header'${header.dest}' = 'stuff'/header
to uri=jms:somewhere /
/when
/choice

As I test this the log gives me the correct information for
${header.dest} and that being stuff, but I do not know how to test
the value in order to send the message to the proper location.  What
is the proper syntax here?  I looked through the Camel in Action book
and the camel website and cannot find anything.

Thanks,
Mark


listener on intermediate queue

2010-08-09 Thread Mark Webb
I am curious as to how Camel routes messages when there is an
intermediate queue involved.

What I am trying to set up is similar to the Loan Broker example at
http://camel.apache.org/loan-broker-example.html.  What is to stop an
external client from listening on queue
jms:queue:creditResponseQueue and seeing what is going on so that
other destinations in the system do not get all of the information and
screw up the system?

Mark


content router to one or many destinations

2010-08-06 Thread Mark Webb
I would like to use a router in Camel that has an input A, and two
outputs B and C.  When a message comes in on A there are times
where I want the message to go to either B *or* C but then in some
cases I might want to the message to go to B *and* C.  Is this
possible using a content router or is there another way to do it?

Thanks,
Mark