- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In documentation it says that the recv function allows a wait parameter to be entered (apparently in milliseconds) but the recv ignores the parameter and hangs waiting for a new message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Amagaquian,
I would like to apologize for the extended delay from our side.
I just tested the Publish/Subscribe Tutorial in Open Edge Insights (OEI) 3.0 and was able to set the timeout amount and catch the exception by wrapping msg = subscriber.recv(timeout=10000) in a try-block as follows.
try:
msg = subscriber.recv(timeout=10000)
except Exception:
print("Publisher Disconnected…")
continue
By doing this, the subscriber will wait 10 seconds after the publisher disconnects. It will continue to print "Publisher Disconnected" every 10 seconds until the publisher is running again. One the publisher is running the subscriber will start receiving messages.
Hope this helps.
Regards,
Jesus
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Amagaquian,
Looking at the message bus api documentation for Python, the recv() function does take two optional parameters (blocking, timeout). Could you please share which version of EII you are using? Are you using EII from Edge Software Hub or Open Edge Insights?
Also, are you running one of our message bus samples to test or are you using your own application?
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jesus,
The documentation say that the function need only one parameter (https://open-edge-insights.github.io/IEdgeInsights/common/libs/EIIMessageBus/python/docs/publish_subscribe_tutorial.html?highlight=recv) and I configured in this way:
Well, now I have a Timeout exception but I don't know how I can capture this exception eii.exc.Timeout Exception.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Amagaquian,
I apologize for the delay on our side, I have escalated this issue to my peers for additional input. I will let you know what I find out.
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Amagaquian,
I would like to apologize for the extended delay from our side.
I just tested the Publish/Subscribe Tutorial in Open Edge Insights (OEI) 3.0 and was able to set the timeout amount and catch the exception by wrapping msg = subscriber.recv(timeout=10000) in a try-block as follows.
try:
msg = subscriber.recv(timeout=10000)
except Exception:
print("Publisher Disconnected…")
continue
By doing this, the subscriber will wait 10 seconds after the publisher disconnects. It will continue to print "Publisher Disconnected" every 10 seconds until the publisher is running again. One the publisher is running the subscriber will start receiving messages.
Hope this helps.
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you need any additional information, please submit a new question as this thread will no longer be monitored.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page