1

I'm trying to do a PoC in order to implement the pipes and filters eip pattern with Apache Camel.

From Camel documentation, I'm assuming that each filter must be implemented as an Endpoint ("With Camel you can split your processing across multiple independent Endpoint instances which can then be chained together.")

So, if I understood correctly, the Authenticate filter (from the example) must implement the Endpoint interface.

The "problem" is that I don't want to "re-invent the wheel". So instead of implementing the interface from the scratch, I'm almost sure that I can use an already implemented one. And the one is the BeanEndpoint.

Is that right?

I found a few examples of pipes and filters patterns (like this one) but none of then show how to implement the beans.

Can someone provide a bean implementation example?

TIA,

Bob

Bob Rivers
  • 5,261
  • 6
  • 47
  • 59
  • 1
    There is no need to implement the Bean endpoint to define a pipe with beans. There are examples [here](http://camel.apache.org/bean.html). Let me know if you are looking for something else. – techuser soma Mar 27 '13 at 02:26

2 Answers2

0

First of all, although I get where you're coming from when you say "camel implements filters as endpoints", I wouldn't strictly classify them as endpoints. More like message transformer/translators in my opinion.

So, in case you need to implement a custom filter as per your requirement, use the processor interface.

Basically, write a class(say, CustomProcessor) that implements Camel's Processor and write your custom filter strategy. Then, call it in your route as to("CustomProcessor").

The Processor page will surely clear all your concerns, so please have a look.

Also I assume you're aware of the camel message-filter pattern.

Thank you.

U2one
  • 381
  • 2
  • 6
0

The Camel EIPs is listed here, and they all have examples and whatnot http://camel.apache.org/eip

So for the pipes and filters you can find it on that link and see some examples https://camel.apache.org/components/3.20.x/eips/pipeline-eip.html

And it seems you are new to Camel. Then I suggest to read this intro article to get your heads around Camel: http://java.dzone.com/articles/open-source-integration-apache

Daniel Käfer
  • 4,458
  • 3
  • 32
  • 41
Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65