You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "turcsanyip (via GitHub)" <gi...@apache.org> on 2023/03/09 14:25:55 UTC

[GitHub] [nifi] turcsanyip commented on a diff in pull request #7023: NIFI-11261 Add Primary Node State handling to GetAzureEventHub

turcsanyip commented on code in PR #7023:
URL: https://github.com/apache/nifi/pull/7023#discussion_r1131087869


##########
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/GetAzureEventHub.java:
##########
@@ -332,7 +385,13 @@ private EventHubConsumerClient createEventHubConsumerClient(final ProcessContext
             final AzureNamedKeyCredential azureNamedKeyCredential = new AzureNamedKeyCredential(policyName, policyKey);
             eventHubClientBuilder.credential(fullyQualifiedNamespace, eventHubName, azureNamedKeyCredential);
         }
-        return eventHubClientBuilder.buildConsumerClient();
+
+        // Set Azure Event Hub Client Identifier using Processor Identifier instead of default random UUID
+        final AmqpClientOptions clientOptions = new AmqpClientOptions();
+        clientOptions.setIdentifier(getIdentifier());

Review Comment:
   The processor's identifier is the same on all cluster nodes so all instances would use the same id.
   When the processor is configured to run in "All nodes" mode, it can be confusing to have multiple clients with the same identifier. Also, in "Primary node" mode it would be useful to see which node the client belongs to.
   So I suggest adding some node-specific tag in the identifier.



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org