Skip to content
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

make it possible to run fluency without runtime dependency on jackson #904

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

pkolaric
Copy link

This allows running fluency without runtime dependencies on jackson-databind (e.g. in Micronaut ecosystem), by implementing a custom org.komamitsu.fluency.recordformat.RecordFormatter and passing it to FluencyBuilderForFluentd.

@komamitsu komamitsu self-assigned this Sep 26, 2024
Copy link
Owner

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I left some comments. See them when you have time.

Comment on lines 122 to 123
responseUnpacker.unpackMapHeader();
responseUnpacker.unpackString();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack field is contained in a Map structure data, and the order and the number of fields can be changed https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1#response. So, the Ack value must be obtained by specifying key ack.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this one... Fixed.

- try-with-resources
- deserialize as an arbitrary map
@pkolaric
Copy link
Author

pkolaric commented Oct 8, 2024

Sorry for the late response i was away for the past 10 days.

@komamitsu
Copy link
Owner

@pkolaric I might be missing something. As long as build.gradle.kts has the dependency to org.msgpack:jackson-dataformat-msgpack, jackson-databind basically remains in the runtime dependency. How will you build your library or application with the change of this PR?

@pkolaric
Copy link
Author

pkolaric commented Oct 11, 2024

By excluding the transitive dependency on jackson, when including fluency, e.g.:

implementation("org.komamitsu:fluency-core:2.7.2-sh3") {
        exclude(group = "org.msgpack", module = "jackson-dataformat-msgpack")
}
implementation("org.komamitsu:fluency-fluentd:2.7.2-sh3") {
        exclude(group = "org.msgpack",  module = "jackson-dataformat-msgpack")
}

This is enough to run fluency without depending on jackson-databind and everything it drags with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants