Pack notifications to be compatible with SDL golang 61/6261/1
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 9 Jun 2021 02:56:54 +0000 (05:56 +0300)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 9 Jun 2021 03:51:54 +0000 (06:51 +0300)
commitdb7753971931247abf7fed67921074e518ec1f6d
treea12a0ebef8b0d9113abf057b1e7858407d3cf3bd
parent8bc881b5681e485add12dbffd5c7ea3f37a04d4f
Pack notifications to be compatible with SDL golang

In SDL Golang 'publish' API implementation packs all the events to single DB
notification, where events are separated by '___' characters. In SDL Golang
subscriber receives this packed DB notification and it splits the DB
notification by '___' characters and calls application notification handler
callback function with list of received events.
Current implementation of SDL Python is however different, is does not do any
packing for events and hence it calls application notification callback many
times, once for each event it has received. Also if SDL Python application is
used as event subscriber and SDL Golang application as event published,
Python application won't be able to handle those notifications what are packed
to one db notification by SDL Golang application.
With this commit implement notification packing to SDL Python.

Issue-ID: RIC-795

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: Ie494430cf46756ea476b98343a8c651a2fa1dbcd
12 files changed:
docs/release-notes.rst
ricsdl-package/examples/notify.py
ricsdl-package/ricsdl/__init__.py
ricsdl-package/ricsdl/backend/dbbackend_abc.py
ricsdl-package/ricsdl/backend/fake_dict_db.py
ricsdl-package/ricsdl/backend/redis.py
ricsdl-package/ricsdl/configuration.py
ricsdl-package/ricsdl/syncstorage.py
ricsdl-package/ricsdl/syncstorage_abc.py
ricsdl-package/tests/backend/test_redis.py
ricsdl-package/tests/test_configuration.py
ricsdl-package/tests/test_syncstorage.py