-
1. Re: How do you get particular info from listeners?
derek.adams Apr 18, 2007 12:50 PM (in response to anescu)The gateways are not currently adding metadata about the source of the message. I agree that it would make sense to have standard metadata for each of the gateways for things like routing and naming files.
The case we ran into at our company was: "What if we want to handle incoming FTP messages differently based on the hostname the message came from?" It kinda goes against the ESB notion of "a service should not care where incoming data comes from", but it is a requirement in many cases.
Anybody else know how this should be handled?
As for handling errors in notifiers, there is still some work to be done in this area of the ESB. The notifier can throw an exception when something goes wrong on the internal protocol, but the exception just kills the action chain. There are some discussions about proper implementation of outgoing gateways in the design forums right now, so you may want to take a look there.
Thanks,
Derek -
2. Re: How do you get particular info from listeners?
marklittle Apr 18, 2007 12:55 PM (in response to anescu)You can set where the message is coming from via the wsa:From EPR. It doesn't need to be set in order for messages to be delivered, but if it is set by the sender then you can do work based on the value as you mention.
-
3. Re: How do you get particular info from listeners?
burrsutter Apr 18, 2007 8:50 PM (in response to anescu)I do like the concept of having things like:
- name of file before it was sucked in
- the file ext
- the hostname/ip address it came from
- the directory it came from
- the date/time it was sucked in
- the size of the file in bytes (perhaps that is easy to calculate since it is in an array) -
4. Re: How do you get particular info from listeners?
anescu Apr 19, 2007 4:12 AM (in response to anescu)Hi,
I think we will need this kind of info quite soon. Now I'm doing a skeleton app and trying to figure out all the stuff that need to be done.
If you don't plan to have this kind of info soon enough maybe we could help a bit.
BTW: also the info set in the "listener" could be made available to the action class (this would take care of maybe half of your list) -
5. Re: How do you get particular info from listeners?
marklittle Apr 23, 2007 1:43 PM (in response to anescu)"burrsutter" wrote:
I do like the concept of having things like:
- name of file before it was sucked in
- the file ext
- the hostname/ip address it came from
- the directory it came from
- the date/time it was sucked in
- the size of the file in bytes (perhaps that is easy to calculate since it is in an array)
I've modified the code so that messages can have the following properties:
- source of the information within the message (can be the name of the file, which will also include the directory and extension).
- transport used to deliver the message (though that is available via the EPR).
- time the message entered the ESB.
- time the message left the ESB.
This should make it into MR2. -
6. Re: How do you get particular info from listeners?
anescu Apr 24, 2007 7:25 AM (in response to anescu)But if I get the latest sources from SVN I will find that info, right?
Thanks, you are really quick :). -
7. Re: How do you get particular info from listeners?
marklittle Apr 25, 2007 12:41 PM (in response to anescu)You will once it's checked in ;-)
Monitor http://jira.jboss.com/jira/browse/JBESB-521 to see when that happens. Just editing some docs at the moment. -
8. Re: How do you get particular info from listeners?
marklittle Apr 25, 2007 3:46 PM (in response to anescu)I checked it into trunk. If you check out the programmers guide you'll see how you can now augment the message yourself at runtime if the metadata we add by default isn't sufficient for you.