https://github.com/apache/camel/tree/master/examples/camel-example-netty-htt
p
I've used that example and have injected in Camel REST routes and it works
perfectly. I wonder if there's a way to do that with SOAP/CXF/Camel in any
combination?
in your route. You can then add it to the registry via
the JNDI registry in Camel Test Support or via Camel Blueprint Test Support.
Mockito is about as simple as it gets and it let's you do some rather
powerful testing of your routes.
Ranx
Does Camel have some built in functionality
I have a bundle with a shared Netty server configured for port and it
works fine from a unit test or curl call. However, if I add the Swagger API
and then hit it with a browser, it doesn't show the port and the call from
the plugin in fails. If I add the .host().port() shown below, it all
I've been looking at some of the documentation and samples with Netty. I'm
especially interested in the fact that the Netty server can be set up in a
bundle and exported as a service and then used in other bundles. In the past
I've used CXF and CXFRS for web services but I'm interested in the
You can use Bindy though I've had better luck with the mapping in Beanio.
Start with that first and then look at using a splitter/tokenizer to process
your files or write them out in the new format you require.
Just create a mapping file and a sample with a few records in it and run a
unit test
Do you have any more specifics like code? Sometimes folks know the answer
but it makes it easier if it is in context.
--
View this message in context:
http://camel.465427.n5.nabble.com/In-which-way-to-provide-http-component-Exchange-HTTP-QUERY-tp5788106p5788283.html
Sent from the Camel -
I think maybe a better explanation of what I'd like to accomplish is in
order. The first is about CXF itself and the second is about Netty. The
following is an example of a service I've set up that uses a single
interface called PaymentServicesAPI which is nothing more than an interface
that
When I look at this how the shared netty server works it seems very much like
what I'd want for microservice bundles in an OSGi environment.
http://camel.apache.org/netty-http-server-example.html
Can it be used with CXF? Are there any examples of using this with CXF?
If not, can one create
Why are you trying to handle the error? There are a couple of settings with
BeanIO that permit you to ignore exceptions or to skip unknown record types.
That may not be what you want though if you are sending the bad things to a
DLQ.
Brad
--
View this message in context:
I assume you have a JSONProvider configured? That usually causes the error
you are seeing.
Does your Book class have an @XmlRootElement at its top? If you're using
JAXB that is required even for JSON.
Brad
--
View this message in context:
You may want to put this in instead of the static log message. This will
show you what you are actually getting out of your splitter.
.log("${body")
How are you trying to suspend/stop the route? I'm not positive and would
have to test it but you've specified streaming and that's going to have
That depends on a lot of other processing issues. Are you actually reading
the contents of the text files or just ftp'ing them to a remote location?
Do you have any control over the remote location? The reason I ask is you
could have two routes set up. The first might look for *.txt files and
Claus,
Please forgive all the @ in here as that was the only way I could post this
to get around the spam filter.
Just to get this working for me so I can start refactoring my code to accept
and process individual items from the unmarshaling of the multi-line beanio
beans I hacked this bit of
One thing you might consider is to use a DTO or "shopping cart" as the body
of your messages to store the state and not use the Exchange itself.
I'm fairly certain Claus isn't at odds with your impulse to use beans
independent of Camel as I think he even writes about that in his book. So
at
You can also throw an exception in a processor to short circuit. From the
use case it does sound like a runtime exception of some sort.
Part of the answer to that question depends on why the processors want to
short circuit. Can you put a validator at the beginning of the route? If
the
Cool. It's good to see you're able to chip away at the problem. This is
another section you may want to look at as well. Christian has good
explanation of it: https://dzone.com/articles/activemq-understanding-memory
This is why when I'm starting on proof of concepts, spikes or protos I tend
If you're trying to the get the bundle symbolic name when in your processor
you can inject it at start up.
The ref to the blueprintBundleContext is provided by default. You can get
the bundle and symbolic name (and pretty much anything else) from it. I'm
not sure if that's what you
Are you eventually going to separate these queues in different locations?
One thing that's happening when you use JMS this way is you read the records
in, and then you immediately write them back out over a socket and then read
them back in. Those all involve duplication of memory.
Since you
There are a variety of ways to do that but what is it you are after actually?
There may be easier ways to accomplish what you are after. Are you using
Blueprint? One mechanism is the BlueprintListener. You can also get the
information and inject it during instantiation and I think the
I think you're hitting a lot of good points there. I'm not used to CSVs with
100 columns of data but can see why that could get huge.
If she starts with SEDA and just sets a queue size of something like 100 or
200 and then sets blockWhenFull to true her streaming will halt until the
queue can
Jens,
That's why I suggested setting the limit on the queue size. She has
streaming turned on already so I believe that will block when the queue
(SEDA or JMS) gets full. But 50,000 objects isn't usually that much memory
so there may be something else in the JMS settings that is actually
There are a number of answers to that question but this should be relatively
easy to fix. Since you are running out of memory you should probably bump
the max memory in the karaf startup batch file. But you will also want to
limit the number of rows that you bring into memory. You already have
Michelle,
There are a number of ways you can do that and it will depend on what is
constraining your REST API. Is it limited on the number of concurrent
connections? Is it limited to the number of transactions/minute? There are
at least two components you'll want after the JMS queue. One will
I have a bean in my blueprint that looks like this:
...
I'd like that to be a bit terser.
I'm sure there
--
View this message in context:
The comment seems to indicate that the code thinks it is dealing with a 500
but I don't see a conversion of the response code there. Obviously it must
be converting it since that's exactly the behavior your seeing.
Great catch.
Brad
--
View this message in context:
How do you want to validate that map's contents? Do you want to validate
specific fields or key/values? There are a number of options. You could
invoke a Java bean or even the Java class you are in if you are using the
Java DSL (which it looks like you are.)
If you use a POJO you might do
I'll either go with DOSGi or stick with my current mechanism using an OSGi
whiteboard and will leave the CXF bus alone for now.
I haven't had enough time to evaluate DOSGi yet so can't comment on its
suitability for my use but using the registration listener mechanism works
well since it lets
Raul,
That was initially what I was trying to find. I figured if there was a bus
there must be a way to use it like that but couldn't find any good
information.
What I ended up with is something works in the other direction now. When I
install my service bundle it registers a service
I'll have to check out the Aires remote services project. The only real work
in this for me was the JAXRS/JAXWS server set ups. I didn't really want to
replicate hardened code in Camel. But it went it fairly painlessly. The
service discovery is pretty straightforward and I'm aiming to keep
Christian,
I'll take a look at that.
The nice thing about using the white board as a webservice registration
mechanism is that I can define all my interceptors, handlers, and security
in a single project. Then when a bundle is installed it registers itself
for exposure. My new server project
So I tried a little different approach which works but requires that I create
my own JAXWS/JAXRS factory which is OK.
As a basic outline I have a factory for setting up SOAP/REST services that
will the interface/implementation it finds. Right now that basic
Microservice interface just has
Not being a real JSON expert I can't help much. I don't find the behavior
too surprising though as when JSON is marshaled/unmarshaled nulls aren't
usually passed from what I've seen. I have a lot more experience with SOAP
and XML in Java than with REST/JSON and I'd have a better idea of how to
Sergey,
I could do it on CXF except I'm using Camel Blueprint and the CXF
implementations there. All the XML schemas and components are Camel
specific as are the binding to the camel bean.
In fact, that's one of the distinct downsides to using Camel/blueprint. One
gets a lot of magic but
Christian,
Thanks. I'll look into that. Right now all my services are defined in
separate bundles and exported to the registry and have interfaces with
REST/SOAP annotations that I expose via an API gateway. That works fairly
well but it obviously couples the deployment.
Part of the problem
What version are you using? You shouldn't have to replicate the definition
into Camel context like that anymore.
http://localhost; />
You can use the default properties for your testing and
I'm going to bump this as I'm getting farther in the project now and this
sort of replication is getting to be more critical.
--
View this message in context:
http://camel.465427.n5.nabble.com/Cross-cutting-concern-for-microservices-tp5776981p5778800.html
Sent from the Camel - Users mailing
I have a client who wants to use deployable microservice bundles with
REST/SOAP APIs. Not a problem of course as it works very well.
The issue is that I'm getting a lot of boilerplate replication across the
project which is only getting to get bigger and more difficult to manage
with time.
This
I noticed there's a snapshot version of the camel-braintree as of 2.17 but do
not see it in the snapshot repo. Where would I find that?
Brad
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-Braintree-tp5778454.html
Sent from the Camel - Users mailing list archive at
And is there a way to set that up so that the service interfaces/endpoints
are just a list?
--
View this message in context:
http://camel.465427.n5.nabble.com/CXF-server-versus-endpoints-tp5778342p5778343.html
Sent from the Camel - Users mailing list archive at Nabble.com.
We are in the process of creating a number of services that will share many
characteristics such as security, logging and so on and it would be great if
we didn't have to replicate a lot of it.
Things like the SOAP binding version, logging interceptors, etc. will be
common
If I create a service factory instantiated in blueprint like this:
And inside the factory just do a Class.forName to instantiate and return it,
will the service reference itself be proxied?
--
View this message in context:
Overall I like the design of CBTS. I like the veracity of Pax Exam but don't
care for all the moving parts. I'm sure it would be quite a headache to
fork CBTS and replace PojoSR with Karaf but to me that would be the best of
both worlds.
By definition any Camel testing is really integration
what was the original problem
> - how it was fixed in newer versions (and in which versions)
> - how the solution evolved over time and what were the timing issues
> you've hit
>
> You're right, it *was* thread race/deadlock problem.
>
> regards
> Grzegorz Grzybek
>
For whatever it's worth for whomever might run into a similar problem, I
think I've identified at least one trigger.
My blueprint-properties.xml is defined with:
By creating a test-blueprint-properties.xml with the same information in it
but no reload strategy the intermittent hang seems to
I believe Quinn mentioned that a new snapshot version of CBTS is out that
fixes a race problem. I'm getting errors in 2.15 that definitely have the
smell of a threading problem. Most of the time my tests run fine but then,
every once in awhile, it will just hang when I go to call getOSGiService.
Is there a good archetype or template to use with Camel/Fuse? What I've
found so far seem to be fairly old.
I've had a working version before but I'm starting a new project and trying
to start with the old project isn't working well and it has been awhile
since I worked with it. I've already
E. Nigma,
Did that solution resonate for you? Are you still stuck?
--
View this message in context:
http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-No-bean-could-be-found-in-the-registry-tp5777228p5777294.html
Sent from the Camel - Users mailing list archive at Nabble.com.
How are you setting up the service in the first bundle? How are you
referring to it in the second bundle?
If you are actually using the bundle during your test then as Quinn pointed
out you needn't use the override method. I suspect it is the service
declaration in the first bundle that is off
My Camel in Action book pages are worn, torn and the the edges of the pages
are blackened from the many times the book has been thumbed through. Sticky
notes and bookmarks adorn the book in answer to long forgotten questions.
But my children are starting to complain that when we curl up by the
By the way, while I realize this is in there for older JBI constructs this is
what I meant when asking if there is a way that a "strict" flag could be
added.
Perhaps that's a question I should post on the developers forum. Even if by
default the flag was false, being able to set it to true and
I think in my case the problem was with how the package scan is working but
I'm not positive. In the Camel Core OSGi package scanner class there is a
section. If it can find it in OSGi it shrugs, throws up its hands and
resorts to brute force classloading. Instead of getting hard error Camel
I'm currently creating test stubs for use with my blueprint tests and for use
in deployment and testing. I've tried various methods with varying degrees
of luck.
Is there a way to substitute a class name at start up? I could create a
factory class to do a class for name on it but would prefer
The current design I use for services is to create an OSGi bundle for each
API interface and then aggregate them in a gateway bundle for exposure via
CXF. During testing I have separate test blueprint files that bootstrap
each bundle with its specific interface and test them via REST and SOAP.
Thud? Opinions, thoughts, wild gesticulating, futurism, and keen technical
insight are all welcome. Is this still so new that it isn't being used by
many folks?
How about the developers of the SCR bundle? What are your thoughts about
it? How do you like it compared with Blueprint?
--
Thanks for the insights. It sounds as if the cfg files would need a form of
semantic versioning then like bundles use. Obviously my insights are
limited. Do you create your configuration files via the maven plugin and
install them in etc with a feature? That might obviate some of the pain.
Having worked with blueprint and CamelBlueprintTestSupport for a couple of
years now at different clients I'm trying to find a better alternative. I
go into clients who usually have a lot of Java developers so staying in the
familiar Java world is something they appreciate.
As of 2.16 the SCR is
I want to follow this up with a quick question and observation.
I've noticed quite a bit of difference in the examples created by the
archetype for 2.15 and 2.16 with 2.16 being far more stripped down. But
both of them use a a deprecated API for part of their testing. That's
something of a
I've reverted to using blueprint.xml for any service reference calls and
limiting the routebuilders for now. The part I found most disconcerting
about this was that the implementation class was being found since it should
be hidden. That means the classloader is pulling it from a bundle and
This is serendipitous as I've recently run into this as well. I switched
from straight Blueprint routes and instantiation to using blueprint to
bootstrap the routebuilder(s). But the injection of the reference to the
service from blueprint doesn't appear to be proxied as I see the concrete
class
I noted that this was closed as "not a problem". I think it is a serious
glitch when the framework isn't respecting something as fundamental as the
contract specified by the interface.
I'm putting in a Fuse installation for clients right now and showing a bunch
of seasoned Java developers how to
60 matches
Mail list logo