Github user ijokarumawak commented on a diff in the pull request:
https://github.com/apache/nifi/pull/3037#discussion_r224302591
--- Diff:
nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java
---
@@ -199,6 +230,8 @@ private String subscribe(ProcessContext context) throws
URISyntaxException {
subscriptionHandle = wEvtApi.EvtSubscribe(null, null, channel,
query, null, null,
evtSubscribeCallback,
WEvtApi.EvtSubscribeFlags.SUBSCRIBE_TO_FUTURE |
WEvtApi.EvtSubscribeFlags.EVT_SUBSCRIBE_STRICT);
+ lastActivityTimestamp = System.currentTimeMillis();
--- End diff --
I think if the client failed to subscribe, it keeps trying reconnecting at
subsequent onTrigger. So, updating lastActivityTimestamp in case of
subscription failure will not lead to premature I believe. But, I updated the
code anyway. It looks more correct in that way, thanks!
---