Class OpennmsKafkaProducer

    • Method Detail

      • destroy

        public void destroy()
      • shouldForwardAlarm

        public boolean shouldForwardAlarm​(OnmsAlarm alarm)
      • handleAlarmSnapshot

        public void handleAlarmSnapshot​(List<OnmsAlarm> alarms)
        Description copied from interface: AlarmLifecycleListener
        Called periodically with a complete set of alarms as present in the database at the given timestamp. This should be used to synchronize any state to ensure it matches what is currently in the database. Note that it is possible that the *current* state of alarms is different from the state at the time at which the snapshot was taken. Implementations should take this in consideration when performing any state synchronization. This method will be called while the related session & transaction that created the alarm are still open. All of the listeners are invoked serially, so the implementors should avoid blocking when possible.
        Specified by:
        handleAlarmSnapshot in interface AlarmLifecycleListener
        Parameters:
        alarms - canonical set of alarms in the database
      • handleNewOrUpdatedAlarm

        public void handleNewOrUpdatedAlarm​(OnmsAlarm alarm)
        Description copied from interface: AlarmLifecycleListener
        Called when an alarm has been created or updated. This method will be called while the related session & transaction that created the alarm are still open. All of the listeners are invoked serially, so the implementors should avoid blocking when possible.
        Specified by:
        handleNewOrUpdatedAlarm in interface AlarmLifecycleListener
        Parameters:
        alarm - a newly created or updated alarm
      • handleDeletedAlarm

        public void handleDeletedAlarm​(int alarmId,
                                       String reductionKey)
        Description copied from interface: AlarmLifecycleListener
        Called when an alarm has been deleted. This method will be called while the related session & transaction that created the alarm are still open. All of the listeners are invoked serially, so the implementors should avoid blocking when possible.
        Specified by:
        handleDeletedAlarm in interface AlarmLifecycleListener
        Parameters:
        alarmId - id of the alarm that was deleted
        reductionKey - reduction key of the alarm that was deleted
      • setTopologyVertexTopic

        public void setTopologyVertexTopic​(String topologyVertexTopic)
      • setTopologyEdgeTopic

        public void setTopologyEdgeTopic​(String topologyEdgeTopic)
      • setEventTopic

        public void setEventTopic​(String eventTopic)
      • setAlarmTopic

        public void setAlarmTopic​(String alarmTopic)
      • setNodeTopic

        public void setNodeTopic​(String nodeTopic)
      • setAlarmFeedbackTopic

        public void setAlarmFeedbackTopic​(String alarmFeedbackTopic)
      • setEventFilter

        public void setEventFilter​(String eventFilter)
      • setAlarmFilter

        public void setAlarmFilter​(String alarmFilter)
      • isForwardingAlarms

        public boolean isForwardingAlarms()
      • getEventForwardedLatch

        public CountDownLatch getEventForwardedLatch()
      • getAlarmForwardedLatch

        public CountDownLatch getAlarmForwardedLatch()
      • getNodeForwardedLatch

        public CountDownLatch getNodeForwardedLatch()
      • getAlarmFeedbackForwardedLatch

        public CountDownLatch getAlarmFeedbackForwardedLatch()
      • setSuppressIncrementalAlarms

        public void setSuppressIncrementalAlarms​(boolean suppressIncrementalAlarms)
      • setKafkaSendQueueCapacity

        public void setKafkaSendQueueCapacity​(int kafkaSendQueueCapacity)
      • getForwardedTopologyVertexMessage

        public CountDownLatch getForwardedTopologyVertexMessage()
      • getForwardedTopologyEdgeMessage

        public CountDownLatch getForwardedTopologyEdgeMessage()
      • getEncoding

        public String getEncoding()
      • setEncoding

        public void setEncoding​(String encoding)
      • getNumEventListenerThreads

        public int getNumEventListenerThreads()
      • setNumEventListenerThreads

        public void setNumEventListenerThreads​(int numEventListenerThreads)