You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Mathias,
Thank you very much for providing such a useful blogpost and test resources!
I selected your approach of the Spring Cloud Contract dependency to start testing a distributed system, which depends on a running rabbitmq.
Unfortunately my stubs create messages, which are distributed in all message consumer queues... but in the existing service-architecture I used Topic Exchanges with specified routing keys, which only forwards selected messages to the defined queue.
Is there any way to reproduce this scenario in your test cases?
My research so far:
Definition of a new header entry:
But the consumer service forwards the message-stub in ALL existing queues. So I have no control to test our "contracts" properly.
Do you have a suggestion where to dive in? Or is my requirement too sophisticated?
I also found out, that the dependency version 1.2.4.RELEASE offers the functionality to include routingKeys... but after I try to use the new Version the test fails with: Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.contract.verifier.converter.YamlContractConverter
The text was updated successfully, but these errors were encountered:
lennartblom
changed the title
How to approach testing different queues?
How to approach testing different queues via routingKey?
Feb 14, 2019
Hi Mathias,
Thank you very much for providing such a useful blogpost and test resources!
I selected your approach of the Spring Cloud Contract dependency to start testing a distributed system, which depends on a running rabbitmq.
Unfortunately my stubs create messages, which are distributed in all message consumer queues... but in the existing service-architecture I used Topic Exchanges with specified routing keys, which only forwards selected messages to the defined queue.
Is there any way to reproduce this scenario in your test cases?
My research so far:
Definition of a new header entry:
header('amqp_receivedRoutingKey': 'requested')
https://stackoverflow.com/questions/51420639/spring-cloud-contract-with-spring-amqp
But the consumer service forwards the message-stub in ALL existing queues. So I have no control to test our "contracts" properly.
Do you have a suggestion where to dive in? Or is my requirement too sophisticated?
I also found out, that the dependency version 1.2.4.RELEASE offers the functionality to include routingKeys... but after I try to use the new Version the test fails with:
Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.contract.verifier.converter.YamlContractConverter
The text was updated successfully, but these errors were encountered: