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

Support metadata with message pacts #43

Open
stan-is-hate opened this issue Jan 23, 2024 · 1 comment
Open

Support metadata with message pacts #43

stan-is-hate opened this issue Jan 23, 2024 · 1 comment

Comments

@stan-is-hate
Copy link
Contributor

This plugin currently supports grpc request/response metadata when doing grpc services.
It would be great if it also supported metadata with the proto messages too.

Our particular use-cases is around kafka messages, where apart from the message body we can also have message key, headers, and topic data (name, replication factor).
Each of these is encoded in bytes: https://github.com/confluentinc/confluent-kafka-go/blob/master/kafka/message.go#L72
We often encode body as a proto as well.

So for cases when body is a proto, I was thinking of using this plugin and use the proto message to pass the body and metadata to pass the rest of the fields (key, headers).

However I don't think metadata is supported when passing proto messages (last parameter is None):
https://github.com/pactflow/pact-protobuf-plugin/blob/main/src/protobuf.rs#L301

@stan-is-hate
Copy link
Contributor Author

I'm willing to help, but don't know rust. Will learn it eventually, but will likely take some time since I'm working on other projects too rn :)

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

No branches or pull requests

1 participant