Code: Alles auswählen
message="""{"topic":"mytopic","partition":49,"offset":0,"tstype":"create","ts":1640007201426,"key":null,"payload":"1:FOO"} {"topic":"mytopic","partition":57,"offset":0,"tstype":"create","ts":1640007201426,"key":null,"payload":"2:BAR"} {"topic":"mytopic","partition":105,"offset":0,"tstype":"create","ts":1640005191767,"key":null,"payload":"2:BAR"} {"topic":"mytopic","partition":43,"offset":2284,"tstype":"create","ts":1640043698491,"key":"43$de..test.core.transfer.testz.misc.testzLaneState$NEW$6be0150b745946e195e2fe783e5b6a38$0","payload":"{}"} {"topic":"mytopic","partition":76,"offset":0,"tstype":"create","ts":1640005191767,"key":null,"payload":"1:FOO"}"""
liste=message_neu.split("} {")
>>> liste
['{"topic":"mytopic","partition":49,"offset":0,"tstype":"create","ts":1640007201426,"key":null,"payload":"1:FOO"', '"topic":"mytopic","partition":57,"offset":0,"tstype":"create","ts":1640007201426,"key":null,"payload":"2:BAR"', '"topic":"mytopic","partition":105,"offset":0,"tstype":"create","ts":1640005191767,"key":null,"payload":"2:BAR"', '"topic":"mytopic","partition":43,"offset":2284,"tstype":"create","ts":1640043698491,"key":"43$de.test.core.transfer.testz.misc.testzLaneState$NEW$6be0150b745946e195e2fe783e5b6a38$0","payload":"{}"', '"topic":"mytopic","partition":76,"offset":0,"tstype":"create","ts":1640005191767,"key":null,"payload":"1:FOO"}']
>>> liste[0]
'{"topic":"mytopic","partition":49,"offset":0,"tstype":"create","ts":1640007201426,"key":null,"payload":"1:FOO"'
>>> liste[1]
'"topic":"mytopic","partition":57,"offset":0,"tstype":"create","ts":1640007201426,"key":null,"payload":"2:BAR"'
split() entfernt doch den delimeter, den ich angebe und nimmt ihn ja nicht mit in das Listenelement