You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. In README.rst, a suggested sample code for listening to message is:
defcallback(message, subscription_id):
print('Subscription ID: {}: Message: {}'.format(subscription_id, message.data.__str__()))
returnTrue# If desired return False to stop the message flow. This will unblock the process as well.listener.listen(callback, maximum_messages=10) # Omitting maximum_messages means you will continue to get messages as they appear. Can be a firehose. Use with caution.# You may pass subscription ID as a parameter to the listen function
However, using this code produces the following error:
e.g., there's no longer a data field in the message.
The code in the demo directory does not seem to have this problem. However, the documentation on the developer platform does say that a message has a 'data' field.
The text was updated successfully, but these errors were encountered:
Hello. In README.rst, a suggested sample code for listening to message is:
However, using this code produces the following error:
This seems like because the schema for a message is different. This is what a message looks like from the streams:
e.g., there's no longer a
data
field in the message.The code in the demo directory does not seem to have this problem. However, the documentation on the developer platform does say that a message has a 'data' field.
The text was updated successfully, but these errors were encountered: