InputEventDispatcher will send the event to the callback immediately while QueueInputEventDispatcher will queue events first and there will be an internal worker (QueueInputEventDispatcherWorker) which send the events to the callback. The reason to accumulate events in a queue in HA is to be used for event syncing. If the event duplicated in the cluster is set to false, then this queue will be used for the event sync among other nodes in the HA deployment.
Regards, Grainier On Wed, Jan 31, 2018 at 6:31 AM, Nirmal Fernando <nir...@wso2.com> wrote: > Hi All, > > Can any of you remember the reason for using a receiver queue in HA mode? > > if (mode == Mode.HA) { > HAConfiguration haConfiguration = > EventReceiverServiceValueHolder.getEventManagementService() > .getManagementModeInfo().getHaConfiguration(); > Lock readLock = > EventReceiverServiceValueHolder.getCarbonEventReceiverManagementService().getReadLock(); > inputEventDispatcher = new QueueInputEventDispatcher(tenantId, > EventManagementUtil.constructEventSyncId(tenantId, > eventReceiverConfiguration.getEventReceiverName(), > Manager.ManagerType.Receiver), > readLock, exportedStreamDefinition, > haConfiguration.getEventSyncReceiverMaxQueueSizeInMb(), > haConfiguration.getEventSyncReceiverQueueSize()); > inputEventDispatcher.setSendToOther(!isEventDuplicatedInCluster); > EventReceiverServiceValueHolder.getEventManagementService() > .registerEventSync((EventSync) inputEventDispatcher, > Manager.ManagerType.Receiver); > } else { > inputEventDispatcher = new InputEventDispatcher(); > } > > > -- > > Thanks & regards, > Nirmal > > Technical Lead, WSO2 Inc. > Mobile: +94715779733 <+94%2071%20577%209733> > Blog: http://nirmalfdo.blogspot.com/ > > > -- Grainier Perera Senior Software Engineer Mobile : +94716122384 WSO2 Inc. | http://wso2.com lean.enterprise.middleware
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev