krisztina-zsihovszki commented on code in PR #8748:
URL: https://github.com/apache/nifi/pull/8748#discussion_r1592646255


##########
nifi-extension-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/processors/slack/ConsumeSlack.java:
##########
@@ -255,38 +259,54 @@ private List<ConsumeChannel> createChannels(final 
ProcessContext context, final
             .filter(s -> !s.isEmpty())
             .forEach(channels::add);
 
-        // Fetch all channel ID's to have a name/ID channel mapping
-        Map<String, String> channelMapping = client.fetchChannelIds();
+        Map<String, String> channelMapping = new HashMap<>();
+
+        if (channelIdsProvidedOnly(channels)) {
+            //resolve the channel names by the specified channel IDs
+            for (String channelId : channels) {
+                String channelName = client.fetchChannelName(channelId);
+                getLogger().info("Resolved Channel ID {} to name {}", 
channelId, channelName);

Review Comment:
   @dan-s1 Thank you for the comment.
   The info logging on line 285 and line 294 were added to the original 
implementation, I just moved the block, on line 268 I tried to follow the 
original logging method in the new code.
   
   I think there won't be so many channels consumed at the same time, but I am 
open to change the level of logging to debug.



-- 
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