提交
This commit is contained in:
+5
-1
@@ -31,10 +31,14 @@ public class EventInboxService {
|
||||
@Value("${baiyue.region:CN}")
|
||||
private String localRegion;
|
||||
|
||||
/** Local single-bridge mode may carry both regional envelopes; production keeps strict routing. */
|
||||
@Value("${baiyue.event-bridge.accept-any-region:false}")
|
||||
private boolean acceptAnyRegion;
|
||||
|
||||
@Transactional
|
||||
public EventReceiveResult receive(EventEnvelope envelope) {
|
||||
envelope.requireValid();
|
||||
if (!envelope.targetRegion().name().equalsIgnoreCase(localRegion)) {
|
||||
if (!acceptAnyRegion && !envelope.targetRegion().name().equalsIgnoreCase(localRegion)) {
|
||||
throw new IllegalArgumentException("事件目标区域与当前事件桥区域不一致");
|
||||
}
|
||||
if (!EventPayloadHash.matches(
|
||||
|
||||
Reference in New Issue
Block a user