Thanks, Grainier. Please see my comments inline.

On Wed, Jan 31, 2018 at 1:07 PM, Grainier Perera <grain...@wso2.com> wrote:

> 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.
>

Actually it's the same QueueInputEventDispatcherWorker which will do the
event sync too, AFAIU. But why a queue? Is it because event sync is a
synchronous operation (DAS1 -> DAS2 -> DAS2-Siddhi -> DAS1)? If so, then my
next question is, why does the event sync has to be synchronous?


> 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 <+94%2071%20612%202384>
> WSO2 Inc. | http://wso2.com
> lean.enterprise.middleware
>



-- 

Thanks & regards,
Nirmal

Technical Lead, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to