Conversation
|
@bsideup When can we expect a public release for this? :) |
kiview
left a comment
There was a problem hiding this comment.
Looks like an elegant solution to me.
| proxy = new SocatContainer() | ||
| .withNetwork(getNetwork()) | ||
| .withTarget(9092, networkAlias) | ||
| .withTarget(9093, networkAlias) |
There was a problem hiding this comment.
I think it would be more consistent to use KAFKA_PORT here (as well as in line 35).
There was a problem hiding this comment.
@kiview changed to constants, could you please re-check?
|
Now, coming back to this after 2 months, I discovered that I don't understand how I should use KafkaContainer now :)
@bsideup Can you help me? Then I probably will can make a PR to your official documentation :) |
|
@iNikem that would be amazing!
|
|
@bsideup @iNikem has this been documented in the meantime? I am trying the exact use case right now. I have all containers including the application that uses Kafka in one Network. Then I have tests outside the network. The producer in the tests connects fine using A quick google indicates it might have something to do with advertised hosts? |
|
@YNedderhoff With recent versions of testcontainers the following setup works nicely for me:
Then all containers can access Kafka on |
|
That's precisely my setup. Maybe it is actually working, I just know that my Spring app complains with that |
|
Ok - I think you are right. Despite that message the app seems to consume data alright. Confusing, but nice that it works :) Thank you! |
See #732