Skip to content

Conversation

@keuin
Copy link

@keuin keuin commented Jan 17, 2026

Summary

This patch adds MessagePack decoder. MessagePack is a JSON-like binary format.

Vector configuration

[sources.in]
type = "stdin"
decoding.codec = "message_pack"

[sinks.out]
type = "console"
inputs = ["in"]
encoding.codec = "json"

How did you test this PR?

I tested it with:

  1. Unit test
  2. Manual test with above config and MessagePack data:
\x87\xA3\x69\x6E\x74\x01\xA5\x66\x6C\x6F\x61\x74\xCB\x3F\xE0\x00\x00\x00\x00\x00\x00\xA7\x62\x6F\x6F\x6C\x65\x61\x6E\xC3\xA4\x6E\x75\x6C\x6C\xC0\xA6\x73\x74\x72\x69\x6E\x67\xA7\x66\x6F\x6F\x20\x62\x61\x72\xA5\x61\x72\x72\x61\x79\x92\xA3\x66\x6F\x6F\xA3\x62\x61\x72\xA6\x6F\x62\x6A\x65\x63\x74\x82\xA3\x66\x6F\x6F\x01\xA3\x62\x61\x7A\xCB\x3F\xE0\x00\x00\x00\x00\x00\x00

This is:

{
	"int": 1,
	"float": 0.5,
	"boolean": true,
	"null": null,
	"string": "foo bar",
	"array": [
		"foo",
		"bar"
	],
	"object": {
		"foo": 1,
		"baz": 0.5
	}
}
\x92\x81\xA3\x76\x61\x6C\x01\x81\xA3\x76\x61\x6C\x02

This is:

[{"val": 1}, {"val": 2}]

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@keuin keuin requested a review from a team as a code owner January 17, 2026 18:55
@keuin keuin force-pushed the feature/msgpack-codec branch 2 times, most recently from 8c4f93a to 19e7c7e Compare January 17, 2026 19:23
@keuin keuin changed the title feat(codec): MessagePack decoder feat(codecs): MessagePack decoder Jan 17, 2026
@keuin keuin force-pushed the feature/msgpack-codec branch from 19e7c7e to 2f30c66 Compare January 17, 2026 19:28
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.

1 participant