-
1. Re: Can you make a routing based on the message format?
tfennelly May 2, 2007 5:36 AM (in response to anescu)Hi there.
This should be possible. This is exactly what Content Based Routing is all about. There are a number of routing based quickstarts that may interest you - simple_cbr, fun_cbr, aggregator.
The CBR implementation currently available supports a DSL for defining XPath based routing expressions. Should be possible to see all that in those quickstarts.
Have fun :-) -
2. Re: Can you make a routing based on the message format?
anescu May 2, 2007 5:40 AM (in response to anescu)Ok, tnx
I have 0 experience with Drools, so I had to ask. I'll try and see if it is possible and what are the limitations. -
3. Re: Can you make a routing based on the message format?
burrsutter May 2, 2007 7:01 AM (in response to anescu)Check out the quickstarts called:
static_router
simple_cbr
fun_cbr
and eventually work your way up to aggregator -
4. Re: Can you make a routing based on the message format?
sebcio Jul 6, 2007 4:07 AM (in response to anescu)Hi,
I'm just facing same requriment. The examples mentioned by Burr utilizes content of the file. I'm trying to develop a file listner as gateway for more then one file format (in my example xml, csv and flat file). Can I get somehow on properties of files beeing read by gateway (particulary the filename, size, suffix, ...)? The content of files is not in focus at first step. Do I have to build custom file listner? Thx for help! -
5. Re: Can you make a routing based on the message format?
sebcio Jul 6, 2007 5:24 AM (in response to anescu)I've forgotten to add: message.getProperties().getProperty("source") returns null. How do I can register the meta-data-filter to provide the message with properites as filename, size, ... (as source)
-
6. Re: Can you make a routing based on the message format?
sebcio Jul 6, 2007 5:50 AM (in response to anescu)sorry but I can't edit my posts in forum, so the last update:
message.getProperties().getPropert("org.jboss.soa.esb.message.source")); message.getProperties().getProperty("org.jboss.soa.esb.message.transport.type"));
with this filter:org.jboss.internal.soa.esb.message.metadata.MetaDataFilter
returns:
11:44:05,631 INFO [STDOUT] PortReference < jms://localhost/queue/mds_fileGateway >
11:44:05,631 INFO [STDOUT] JMS
I've read this in Programmers Guide:org.jboss.soa.esb.message.source: this is the source of the
message, e.g., the file from which is was read.
but my query not returns needed information. How do I have to get it? Thx again for any help. -
7. Re: Can you make a routing based on the message format?
anescu Jul 6, 2007 5:55 AM (in response to anescu)Hi,
your gateway is a JMS, maybe for that that's all the info you're gona get. Try using another gateway (FTP/file system) and see what the properties return.
Or the guide is wrong, maybe by the source they mean the source gateway... -
8. Re: Can you make a routing based on the message format?
sebcio Jul 6, 2007 6:26 AM (in response to anescu)Hello,
my gateway is a file gateway, it's slightly modified helloworld_file_action.Files that are found in a particular directory with a particular extension are sent to a JMS queue with actions for processing
The information provided by filter is comming from JMS queue, I want get infos form previous step (file->JMS queue). I don't know how to get on it.
You wanted to build the similar solution, have you solved this problem? -
9. Re: Can you make a routing based on the message format?
marklittle Jul 6, 2007 6:57 AM (in response to anescu)"sebcio" wrote:
but my query not returns needed information. How do I have to get it? Thx again for any help.
Add your own filter that will be used at deployment time if the default information is not sufficient. The manual describes how you can go about doing that. -
10. Re: Can you make a routing based on the message format?
marklittle Jul 6, 2007 6:58 AM (in response to anescu)BTW, any more issues about meta-data attached to (or obtained from) messages, please create a new forum posting and do not clutter this one. It makes it difficult for future readers to figure out where to go for help by browsing the forums only based on title. Thanks.
-
11. Re: Can you make a routing based on the message format?
anescu Jul 6, 2007 7:30 AM (in response to anescu)"sebcio" wrote:
Hello,
You wanted to build the similar solution, have you solved this problem?
We posponed the system until august. But that is still our issue. We built a servicing web site in the meantime, we are about to finish this one and we'll get back to building the ESB.
So the problem is still in our path, if you find any solution keep me informed. If not, I'll have to deal with it when I get there. -
12. Re: Can you make a routing based on the message format?
sebcio Jul 6, 2007 7:49 AM (in response to anescu)ok, I have to solve it till monday :-) Mark wrote its described in manual, I only found one sentece:
More meta-data can be added to the message by creating and registering suitable
, but the problem ist the data for this issue are not collecting on right place. The registered filter do the job right but one step to late (after transforming into message). If I could solve it, I'll give you to know.
filters. -
13. Re: Can you make a routing based on the message format?
marklittle Jul 6, 2007 8:01 AM (in response to anescu)PLEASE TAKE THIS DISCUSSION TO A NEW FORUM ENTRY :-) THANKS.