Dit is mijn eigen test script in Python3. Werkt dat wel voor je? Je kunt
dan direct de niet-besteffort variant testen. Kijken we daarna wel of
het aan Java ligt.
#!/usr/bin/env python3
from gzip import GzipFile
from io import BytesIO
import zmq
import time
context = zmq.Context()
subscriber = context.socket(zmq.SUB)
subscriber.connect("tcp://
pubsub.besteffort.ndovloket.nl:7664")
subscriber.setsockopt_string(zmq.SUBSCRIBE,"/RIG/InfoPlusDVSInterface4")
while True:
multipart = subscriber.recv_multipart()
address = multipart[0]
print(address)
try:
contents = b''.join(multipart[1:])
contents = GzipFile('','r',0,BytesIO(contents)).read()
contents = contents.decode('UTF-8') # .replace('\n',
'').replace('\r', '')
# print(int(time.time()), address , contents)
print(int(time.time()), address)
except:
open('/tmp/test.xml', 'wb').write(contents)
raise
pass
subscriber.close()
cont
--
Stefan