Open csaroff opened 2 years ago
Another extension to this is something where the Callback deserialize function could be configurable.
Something like:
def deserialize_func(message):
return message
@sub(topic='my-topic', deserialize=deserialize_func):
def handle_upload(data, **kwargs):
print('Handling data', data)
By default, I would expect the current behaviour. But for some use cases, like @csaroff 's , you may want to control the deserialization logic yourself.
Yeah, agreed. That's much better
Currently rele's subscription model only supports consuming messages that are json deserializable.
Unfortunately some of GCP's core services publish non-json messages. For example, the gcp dicom store publishes notifications to a topic when a new dicom instance was inserted, but the message field is just the dicom instance path. When attempting to consume these messages through rele, we get the following error.
Can we add an option to disable deserialization of these messages? Something like: