1

I have a spring webapp that communicates with external service over kafka. IS it possible to somehow test contract between those services?

user3364192
  • 3,783
  • 2
  • 21
  • 30

1 Answers1

2

Yes you can. Spring Cloud Contract supports CDC with messaging. If you're using Spring Cloud Stream - the work to be done is trivial. If not then you'll have to implement your own as presented in this issue - Spring Cloud Contract and plain 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

Community
  • 1
  • 1
Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32