New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider making FileTailingEvent#getMessage() method public #3286
Labels
Milestone
Comments
Toparvion
added
status: waiting-for-triage
The issue need to be evaluated and its future decided
type: enhancement
labels
May 20, 2020
garyrussell
added
backport 4.3.x
and removed
status: waiting-for-triage
The issue need to be evaluated and its future decided
labels
May 20, 2020
I am sure this was just a simple mistake (probably some IDE auto-created getter); I can't believe it has taken 7 years for this to be reported. |
@Toparvion , Thanks |
Toparvion
added a commit
to Toparvion/spring-integration
that referenced
this issue
May 21, 2020
To provide application code with a way to properly handle original messages emitted from the underlying tailing producer
@artembilan , @garyrussell , thank you for the welcoming reply! |
Toparvion
added a commit
to Toparvion/spring-integration
that referenced
this issue
May 21, 2020
To provide application code with a way to properly handle original messages emitted from the underlying tailing producer
artembilan
pushed a commit
that referenced
this issue
May 21, 2020
Fixes #3286 The `FileTailingEvent.getMessage()` is really meant to be as `public` **Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x**
artembilan
pushed a commit
that referenced
this issue
May 21, 2020
Fixes #3286 The `FileTailingEvent.getMessage()` is really meant to be as `public` **Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x**
artembilan
pushed a commit
that referenced
this issue
May 21, 2020
Fixes #3286 The `FileTailingEvent.getMessage()` is really meant to be as `public` **Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x**
artembilan
pushed a commit
that referenced
this issue
May 21, 2020
Fixes #3286 The `FileTailingEvent.getMessage()` is really meant to be as `public` **Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x** # Conflicts: # spring-integration-file/src/main/java/org/springframework/integration/file/tail/FileTailingMessageProducerSupport.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
FileTailingMessageProducerSupport.FileTailingEvent#getMessage
method might bepublic
instead ofprotected
to allow application code be aware of what is happening with a file beingtail
ed.Current Behavior
Currently, when handling
FileTailingEvent
s, application listeners have no access to the message produced by the underlying tail implementation. Therefore they cannot distinguish one file event type from another (e.g. absence from rotating) thus making the handling inefficient.Context
I realize that it is generally not a good idea to rely on the text of the event as it comes from the underlying tailing provider (such as Apache Commons or OS Delegate) and thus can vary greatly depending on the platform. Nonetheless, there are some use cases where the message is still needed, for example:
toString()
method is too verbose for that)The only alternative I see at the moment is to parse the
toString()
method output but it seems irrational and brittle.If there is no security/compatibility/etc reason for keeping the method
protected
, I would submit a pull request making itpublic
with the corresponding javadoc warning about its changeable nature.The text was updated successfully, but these errors were encountered: