Hazelcast 订阅中的通配符
Wildcards in Hazelcast Subscriptions
如何根据通配符订阅主题?比如有两个主题:account.transactions和account.returns,我可以订阅account.*?
你不能那样做,但是你可以使用 HazelcastInstance::getDistributedObjects
尝试 ITopic 实例 (if (obj instanceOf ITopic
) 并使用 DistributedObject::getName
来测试你的模式的名称。
如何根据通配符订阅主题?比如有两个主题:account.transactions和account.returns,我可以订阅account.*?
你不能那样做,但是你可以使用 HazelcastInstance::getDistributedObjects
尝试 ITopic 实例 (if (obj instanceOf ITopic
) 并使用 DistributedObject::getName
来测试你的模式的名称。