[ 
https://issues.apache.org/jira/browse/SPARK-4631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296790#comment-14296790
 ] 

Iulian Dragos commented on SPARK-4631:
--------------------------------------

[~advancedxy], I see the same exception in the logs. It's funny, but as I 
mentioned in my github account, things start working if I add a 
`Thread.sleep(50)` inside the loop, or a longer one before the call to 
{{publishData}}. On my machine it takes around 250ms for the Receiver to 
install its MQTT callback, and I think that's where the race condition is. If 
{{publishData}} finishes before that, no message is ever received on the Spark 
receiver end.

I don't know much about MQTT, so I don't know if the service is supposed to 
queue those 100 messages and deliver them eventually.

> Add real unit test for MQTT 
> ----------------------------
>
>                 Key: SPARK-4631
>                 URL: https://issues.apache.org/jira/browse/SPARK-4631
>             Project: Spark
>          Issue Type: Test
>          Components: Streaming
>            Reporter: Tathagata Das
>            Priority: Critical
>             Fix For: 1.3.0
>
>
> A real unit test that actually transfers data to ensure that the MQTTUtil is 
> functional



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to