Jeff Dasch created RYA-386:
------------------------------

             Summary: Fix Scoping issue in KafkaNotificationRegistration Client.
                 Key: RYA-386
                 URL: https://issues.apache.org/jira/browse/RYA-386
             Project: Rya
          Issue Type: Improvement
    Affects Versions: 3.2.11
            Reporter: Jeff Dasch
            Priority: Minor


The {{KafkaNotificationRegistrationClient}} implements the interface 
{{PeriodicNotificationClient}} which extends {{AutoCloseable}}, however 
{{KafkaNotificationRegistrationClient}}'s constructor receives a 
{{KafkaProducer}} which is instantiated elsewhere and could be referenced by 
other objects.

One of the following changes should occur:
- KafkaNotificationRegistrationClient should not close the KafkaProducer and 
the close method should be commented to explain the null implementation, or 
perhaps PeriodicNotificationClient should not implement AutoCloseable.  Whoever 
instantiates the  KafkaProducer should also be responsible for closing it.
- The KafkaNotificationRegistrationClient should instantiate a KafkaProducer 
instead of receiving it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to