0
votes

Is there any way to set Inbound Endpoint attributes based on data in an event?

This is my scenario: I receive messages from a JMS queue containing a path as payload, then I want to use a File Inbound Endpoint to read from the path that came in the message and process the resulting files. I know only outbound endpoints are supposed to be dynamic.

Any workaround to solve this??

2

2 Answers

0
votes

If nothing else works, inject the path to a custom component and read the file in that component. Then you can return the file or what ever you want as a payload.

0
votes

Answering this even though the OP is old as t still comes up in searches. A reasonable solution for this is to use the Mule Requester Module community component which can be added from exchange. The MRM can takes a resource, which can be of any resource type such as a file on a File directory, FTP path, SFTP, or a JMS Queue entry, etc. The resource is define full path, like file:///filepath/somefilename, so the name and path is set dynamically, not statically as with a file inbound endpoint, so in this case could be built from information received from the JMS queue.