I've an application prototype that uses B4J Mqtt Broker and I'd want to implement a Webapp server to catch all the messages events ,display them on a console window and save on a MYSQL DB.
Looking at Mqtt broker object, I can't access the events from code (don't expose the on connect, publish or disconnect events), so :
-Is there anyway to access this events from code ?? (I know I can save the log to a file -tslogger/jlogger-, but it should be simple if the events were accessible)
-Is there anyway to read the payload messages from mqtt broker to save to an external DB?
(Log of B4J MQTT Broker on UI app)
Looking at Mqtt broker object, I can't access the events from code (don't expose the on connect, publish or disconnect events), so :
-Is there anyway to access this events from code ?? (I know I can save the log to a file -tslogger/jlogger-, but it should be simple if the events were accessible)
-Is there anyway to read the payload messages from mqtt broker to save to an external DB?
(Log of B4J MQTT Broker on UI app)
B4X:
Received a message of type CONNECT
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping CONNECT
cleaning old saved subscriptions for client <User1>
Create persistent session for clientID <User1>
Connected client ID <User1> with clean session true
Received a message of type SUBSCRIBE
Received a message of type SUBSCRIBE
Received a message of type SUBSCRIBE
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping SUBSCRIBE
<User1> subscribed to topic <drawers/#> with QoS 0 - MOST_ONE
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping SUBSCRIBE
<User1> subscribed to topic <last> with QoS 1 - LEAST_ONE
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping SUBSCRIBE
<User1> subscribed to topic <user1> with QoS 1 - LEAST_ONE
Received a message of type PINGREQ
Received a message of type CONNECT
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping CONNECT
cleaning old saved subscriptions for client <User2>
Create persistent session for clientID <User2>
Connected client ID <User2> with clean session true
Received a message of type SUBSCRIBE
Received a message of type SUBSCRIBE
Received a message of type SUBSCRIBE
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping SUBSCRIBE
<User2> subscribed to topic <drawers/#> with QoS 0 - MOST_ONE
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping SUBSCRIBE
<User2> subscribed to topic <last> with QoS 1 - LEAST_ONE
onEvent processing messaging event from input ringbuffer ProtocolEvent wrapping SUBSCRIBE
<User2> subscribed to topic <user2> with QoS 1 - LEAST_ONE
Received a message of type PINGREQ