Hi,
I was "out of order" for a few days, but now I tried a comparison regarding your suggestion.
I think I noticed about 20% better throughput if I complie the MQTT_Broker with #USE_BASE64_PAYLOAD = #False.
I cannot fully test it, because a problem occured:
Publishes from broker to clien appear to have the wrong encoding, looks a bit like the ASCII unicode problem from the old days.
Logwindow Broker publish: #USE_BASE64_PAYLOAD = #False
Manual testdata published > HOME/OUT/cnt=4
Manual testdata published > HOME/OUT/data={"CNT":4,"EPOCH":1716135317,"%1":"#R318D04610"}
Logwindow Client (doesn't matter #USE_BASE64_PAYLOAD = #True or #False)
Rcvd published Topic: 'HOME/OUT/cnt'->p (Q=0, D=0, R=0, M=0)
Rcvd published Topic: 'HOME/OUT/data'->P (Q=0, D=0, R=0 M=0)
Nearly the same applies when using MQTT-Explorer-0.4.0-beta1.exe
cnt = �
data = P����p'P�
But publishes from client to broker seem to be understood correctly, Logwindow Broker shows readable text.
This is my "helper" for manual broker-publishes, if important.:
Code: Select all
Procedure.s BrokerPublish(Topic.s, DatStr.s) ; Only helper for broker-publishing
Protected *Payload, L ; Call : BrokerPublish("HOME/OUT/cnt", "123")
*Payload = UTF8(DatStr) : L = Len(DatStr)
MQTT_BROKER::_PublishViaServer(Topic, *Payload, L, 0, MQTT_Common::#PayloadType_Buffer)
FreeMemory(*Payload)
EndProcedure