Claus Ibsen created CAMEL-24855:
-----------------------------------
Summary: camel-jbang, camel-file - a file consumer of a directory
that does not exist runs in silence: the validator names the files that are
there, the consumer says it created the directory
Key: CAMEL-24855
URL: https://issues.apache.org/jira/browse/CAMEL-24855
Project: Camel
Issue Type: Improvement
Components: camel-jbang, camel-file
Reporter: Claus Ibsen
A route that consumes from a directory the project does not have:
{code:yaml}
- route:
from:
uri: file://orders?noop=true&include=order.json
{code}
with {{order.json}} in the folder next to the route and no {{orders/}}
directory, starts, creates the empty directory (autoCreate) and waits: no
error, no output. In the round-2 benchmark (series l3) 7 of 9 silent attempts
were this shape (json-transform), and a dry run before series l had it three
times. For a person prototyping with camel run it is the hardest failure to
read: nothing is wrong, nothing happens.
Two small pieces:
* the directory-aware validation (camel-jbang-core SourceValidator, the path
that has the files) reports a {{from: file:<dir>}} whose directory does not
exist in the project, and names what the directory holds ("the folder has
order.json and no orders/ directory: read the folder with file:. and
include=order.json, or put the file in orders/")
* the file consumer logs at INFO when it creates the directory it consumes from
("Created directory orders (it did not exist): waiting for files"), instead of
only at debug, so camel run shows why nothing happens
The ftp/sftp/smb consumers have their own remote directories and are out of
scope.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)