Hi, I'm utilizing the capability of pact SDK to b...
# general
f
Hi, I'm utilizing the capability of pact SDK to build a contract broker in my company for internal rpc services. The broker I'm building aims to support contract publishing, contract retrieval and response verification. A quick question: our company uses a set of self-defined rpc protocols, what's the best practice of applying pact to our company's rpc protocols? Does pact directly support that? Or should I use an adapter layer to first transform the rpc response to the model that rpc can identify, and then use methods like compareSynchronousMessage() to process verification?
r
Pact won't know how to compare your RPC format. You would need to either provide the comparison logic, or convert it to a format that Pact can understand. A lot of formats are convertible to JSON (i.e. Protobufs), so that is one way to do it.
f
Got it. Thank you! Btw can pact plugin solve this kind of problem?
r
Yes, if you create a plugin for it. That is how gRPC is supported.