exceptionfactory commented on code in PR #7006:
URL: https://github.com/apache/nifi/pull/7006#discussion_r1124479716


##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java:
##########
@@ -86,7 +86,10 @@
 import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Azure Event Hubs, writing the 
contents of the message to the content of the FlowFile.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "
+        + "This processor shares the same functionality as GetAzureEventHub 
but supports checkpoints via Azure Blob Storage. "
+        + "Using checkpoints eliminates the chance of consuming a message 
multiple times. "

Review Comment:
   Recommend adjusting the wording to mention additional benefits.
   ```suggestion
           + "Checkpoint tracking avoids consuming a message multiple times and 
enables reliable resumption of processing in the event of intermittent network 
failures. "
   ```



##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java:
##########
@@ -64,8 +64,12 @@
 import org.apache.nifi.processors.azure.eventhub.utils.AzureEventHubUtils;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the Azure message to the content of the FlowFile. "
-        + "Note: Please be aware that this processor creates a thread pool of 
4 threads for Event Hub Client. They will be extra threads other than the 
concurrent tasks scheduled for this processor.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "
+        + "Note: Please be aware that this processor creates a thread pool for 
Event Hub Client. "
+        + "They will be extra threads other than the concurrent tasks 
scheduled for this processor. "
+        + "Please also be aware that this processor does not support 
checkpoints. "
+        + "Meaning there is no way to continue receiving messages from a 
certain offset after the processor has been stopped, "
+        + "which can lead to data duplication. It is recommended to use 
ConsumeAzureEventHub instead if possible.")

Review Comment:
   With the suggested rewording in the first sentence, recommend the following 
changes:
   ```suggestion
           + "Lack of message checkpointing in GetAzureEventHub can result in 
data loss or data duplication depending on scheduling settings.")
   ```



##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java:
##########
@@ -64,8 +64,12 @@
 import org.apache.nifi.processors.azure.eventhub.utils.AzureEventHubUtils;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the Azure message to the content of the FlowFile. "
-        + "Note: Please be aware that this processor creates a thread pool of 
4 threads for Event Hub Client. They will be extra threads other than the 
concurrent tasks scheduled for this processor.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "
+        + "Note: Please be aware that this processor creates a thread pool for 
Event Hub Client. "

Review Comment:
   The `Note` prefix can be removed.
   ```suggestion
           + "This processor creates a thread pool for connections to Azure 
Event Hubs. "
   ```



##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java:
##########
@@ -86,7 +86,10 @@
 import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Azure Event Hubs, writing the 
contents of the message to the content of the FlowFile.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "
+        + "This processor shares the same functionality as GetAzureEventHub 
but supports checkpoints via Azure Blob Storage. "
+        + "Using checkpoints eliminates the chance of consuming a message 
multiple times. "
+        + "Hence, this is the preferred way to consume Azure Event Hubs 
messages if Azure Blob Storage is available.")

Review Comment:
   ```suggestion
           + "Checkpoint tracking requires external storage and provides the 
preferred approach to consuming messages from Azure Event Hubs.")
   ```



##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/ConsumeAzureEventHub.java:
##########
@@ -86,7 +86,10 @@
 import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Azure Event Hubs, writing the 
contents of the message to the content of the FlowFile.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "
+        + "This processor shares the same functionality as GetAzureEventHub 
but supports checkpoints via Azure Blob Storage. "

Review Comment:
   As the preferred approach, the initial description should not be defined in 
terms of similarity to `GetAzureEventHub`. Recommend the following wording for 
the first sentence:
   ```suggestion
           + "Receives messages from Microsoft Azure Event Hubs with 
checkpointing to ensure consistent event processing. "
   ```



##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java:
##########
@@ -64,8 +64,12 @@
 import org.apache.nifi.processors.azure.eventhub.utils.AzureEventHubUtils;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the Azure message to the content of the FlowFile. "
-        + "Note: Please be aware that this processor creates a thread pool of 
4 threads for Event Hub Client. They will be extra threads other than the 
concurrent tasks scheduled for this processor.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "
+        + "Note: Please be aware that this processor creates a thread pool for 
Event Hub Client. "
+        + "They will be extra threads other than the concurrent tasks 
scheduled for this processor. "
+        + "Please also be aware that this processor does not support 
checkpoints. "

Review Comment:
   With the above rewording, these two sentences can be removed.
   ```suggestion
   ```



##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java:
##########
@@ -64,8 +64,12 @@
 import org.apache.nifi.processors.azure.eventhub.utils.AzureEventHubUtils;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the Azure message to the content of the FlowFile. "
-        + "Note: Please be aware that this processor creates a thread pool of 
4 threads for Event Hub Client. They will be extra threads other than the 
concurrent tasks scheduled for this processor.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "
+        + "Note: Please be aware that this processor creates a thread pool for 
Event Hub Client. "
+        + "They will be extra threads other than the concurrent tasks 
scheduled for this processor. "
+        + "Please also be aware that this processor does not support 
checkpoints. "
+        + "Meaning there is no way to continue receiving messages from a 
certain offset after the processor has been stopped, "
+        + "which can lead to data duplication. It is recommended to use 
ConsumeAzureEventHub instead if possible.")
 @InputRequirement(Requirement.INPUT_FORBIDDEN)

Review Comment:
   Recommend adding the `@SeeAlso` annotation referencing 
`ConsumeAzureEventHub`.



##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java:
##########
@@ -64,8 +64,12 @@
 import org.apache.nifi.processors.azure.eventhub.utils.AzureEventHubUtils;
 
 @Tags({"azure", "microsoft", "cloud", "eventhub", "events", "streaming", 
"streams"})
-@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the Azure message to the content of the FlowFile. "
-        + "Note: Please be aware that this processor creates a thread pool of 
4 threads for Event Hub Client. They will be extra threads other than the 
concurrent tasks scheduled for this processor.")
+@CapabilityDescription("Receives messages from Microsoft Azure Event Hubs, 
writing the contents of the message to the content of the FlowFile. "

Review Comment:
   ```suggestion
   @CapabilityDescription("ConsumeAzureEventHub offers the recommended approach 
to receiving messages from Azure Event Hubs. GetAzureEventHub receives messages 
from Microsoft Azure Event Hubs without reliable checkpoint tracking. "
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to