Skip to content

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