use of org.apache.cloudstack.framework.messagebus.MessageSubscriber in project cloudstack by apache.
the class TestMessageBus method testRootSubjectMatch.
@Test
public void testRootSubjectMatch() {
_messageBus.subscribe("/", new MessageSubscriber() {
@Override
public void onPublishMessage(String senderAddress, String subject, Object args) {
Assert.assertTrue(subject.equals("Host") || subject.equals("VM"));
}
});
_messageBus.publish(null, "Host", PublishScope.LOCAL, null);
_messageBus.publish(null, "VM", PublishScope.LOCAL, null);
_messageBus.clearAll();
}
Aggregations