apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.41k stars 26.42k forks source link

[Bug] docker dubbo cluster broadcast not working #14169

Open seqwait opened 4 months ago

seqwait commented 4 months ago

Pre-check

Search before asking

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

openjdk1.8 release:3.2.0 dubbo: 2.0.2

Steps to reproduce this issue

two instance app service registry to docker service name docker compose config

DUBBO_IP_TO_REGISTRY: "app"

consumer invoke

@DubboRefrence(cluster="broadcast")
IService iService

result only one instance receive and execute iService method

What you expected to happen

all app instance service execute iService method

Anything else

No response

Are you willing to submit a pull request to fix on your own?

Code of Conduct

AlbumenJ commented 4 months ago

Dubbo will aggegrate the providers which have the same address.

wcy666103 commented 4 months ago

You can have a look at the example I wrote, where case-configuration.yml will be converted to a real docker file in the target directory, you can refer to how to use it

https://github.com/wcy666103/dubbo-samples/tree/449034e37c8d6ea3d8b289193b9644a2b0892ab3/2-advanced/dubbo-samples-broadcast

image