Требуется помощь знатоков.
Пишу собственный класс для BGInetAccounting, который подписывается на событие InetAccountingEvent, чтобы независимо считать трафики.
Делаю так:
Код:
public class QuotaCollector implements EventListener<InetAccountingEvent>, Lifecycle {
...
@Override
public void start() throws Exception {
EventProcessor ep = EventProcessor.getInstance();
ep.addListener(this, InetAccountingEvent.class, this.accounting.moduleId, null);
this.initWorkers();
}
@Override
public void notify(InetAccountingEvent event, EventListenerContext eventListenerContext) throws BGException {
logger.debug("caught event InetAccountingEvent: "+event);
...
}
...
}
В логах вижу, что на событие я подписался, события ходят, но я их не получаю (нет строчек "caught event InetAccountingEvent")
Код:
all.log:radius 09-06/15:11:21 DEBUG [main] EventProcessor - Add ru.dsi.bgbilling.modules.inet.accounting.quota.QuotaCollector@17d2f0e to BG.Event.ru.bitel.bgbilling.modules.inet.accounting.event.InetAccountingEvent WHERE moduleId=26
all.log:radius 09-06/15:11:21 DEBUG [main] EventProcessor - Add ru.bitel.bgbilling.modules.inet.radius.InetRadiusProcessor@bdb375 to BG.Event.ru.bitel.bgbilling.modules.inet.accounting.event.InetAccountingEvent WHERE moduleId=26
all.log:mq 09-06/15:15:19 DEBUG [evpool-pblsh-p-4-t-1] EventProcessor - Publish: Event[pool:ru.bitel.bgbilling.modules.inet.accounting.event.InetAccountingEvent] timestamp: 1378448119340; moduleId: 26; pluginId: -1; cid: -1; scid: -1; userId: -1
all.log:mq 09-06/15:16:40 DEBUG [evpool-pblsh-p-4-t-2] EventProcessor - Publish: Event[pool:ru.bitel.bgbilling.modules.inet.accounting.event.InetAccountingEvent] timestamp: 1378448200366; moduleId: 26; pluginId: -1; cid: -1; scid: -1; userId: -1
all.log:mq 09-06/15:16:40 DEBUG [evpool-pblsh-p-4-t-2] EventProcessor - Publish: Event[pool:ru.bitel.bgbilling.modules.inet.accounting.event.InetAccountingEvent] timestamp: 1378448200993; moduleId: 26; pluginId: -1; cid: -1; scid: -1; userId: -1
Смотрю по jmx - так и есть: стандартный consumer получает всё, а я - ничего.
Вложение:
consumer1.png [ 75.09 КБ | Просмотров: 4302 ]
Вложение:
consumer2.png [ 72.78 КБ | Просмотров: 4302 ]
(остальные 2 подписчика к делу отношения не имеют - они для другого moduleId)
Почему так? Это же топик, а не очередь, вроде должны получать оба подписчика?