简体   繁体   English

Spring Cloud Contract-与非Spring端点集成

[英]Spring cloud contract - integrating with non - spring endpoint

I have a spring webapp that communicates with external service over kafka. 我有一个spring webapp,可以通过kafka与外部服务进行通信。 IS it possible to somehow test contract between those services? 是否可以通过某种方式测试这些服务之间的合同?

Yes you can. 是的你可以。 Spring Cloud Contract supports CDC with messaging. Spring Cloud Contract通过消息传递支持CDC。 If you're using Spring Cloud Stream - the work to be done is trivial. 如果您使用的是Spring Cloud Stream-要做的工作很简单。 If not then you'll have to implement your own as presented in this issue - Spring Cloud Contract and plain Spring AMQP . 如果没有,那么您将必须实现本期中介绍的自己的解决方案-Spring Cloud Contract和普通的Spring AMQP Summing it up it's enough for both consumer and producer to implement a custom org.springframework.cloud.contract.verifier.messaging.MessageVerifier bean that will be responsible for receiving and sending of messages via Kafka 总结一下,对于消费者和生产者而言,就足以实现一个自定义的org.springframework.cloud.contract.verifier.messaging.MessageVerifier bean,该bean负责通过Kafka接收和发送消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM