You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/05/29 17:39:00 UTC
[jira] [Commented] (NIFI-6701) PublishGCPPubSub does not send all
messages
[ https://issues.apache.org/jira/browse/NIFI-6701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17119786#comment-17119786 ]
ASF subversion and git services commented on NIFI-6701:
-------------------------------------------------------
Commit 8162edfd9891159cc1636c4f496de911ee752b9c in nifi's branch refs/heads/master from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8162edf ]
NIFI-6701 - Fix for PublishGCPPubSub
> PublishGCPPubSub does not send all messages
> -------------------------------------------
>
> Key: NIFI-6701
> URL: https://issues.apache.org/jira/browse/NIFI-6701
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.9.2
> Reporter: Jake Dalli
> Assignee: Pierre Villard
> Priority: Major
> Labels: easyfix
> Time Spent: 1h
> Remaining Estimate: 0h
>
> I have found an issue with the PublishGCPPubSub processor. After implementing a number of flows, I have realised that approximately 30% of messages are sporadically not sent to Pubsub in spite of a 'Send Successful' response from the processor.
>
> Upon investigating the code on github ([https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/pubsub/PublishGCPubSub.java|https://slack-redir.net/link?url=https%3A%2F%2Fgithub.com%2Fapache%2Fnifi%2Fblob%2Fmaster%2Fnifi-nar-bundles%2Fnifi-gcp-bundle%2Fnifi-gcp-processors%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fnifi%2Fprocessors%2Fgcp%2Fpubsub%2FPublishGCPubSub.java]), I found the following issue:
> # On line 163 we get the Future for the 'Publish message' action.
> # On line 165 we have the following loop:
> {code:java}
> while (messageIdFuture.isDone()) {
> Thread.sleep(500L);
> }
> {code}
> This means that if the future isDone method returns, the thread sleeps. It is unclear to me why this is the case and I believe this is a bag, in my opinion the processor should sleep if the future is not done, thus the loop should read:
> {code:java}
> while(!messageIdFuture.isDone()){ ... }{code}
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)