lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] MQTT: Matching data to topic for InPub?


From: address@hidden
Subject: Re: [lwip-users] MQTT: Matching data to topic for InPub?
Date: Fri, 2 Jul 2021 09:40:53 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Am 01.07.2021 um 22:28 schrieb Luciano Moretti:
> Hi:
> Looking at getting MQTT working and while Outgoing Publishes and
> Subscription Requests are working I have a question trying to resolve
> the Incoming Publishes. The MQTT client uses 2 callbacks to split the
> Incoming Publish: The mqtt_incoming_publish_cb_t() and
> the mqtt_incoming_data_cb_t(). Looking at the MQTT Client code a single
> MQTT_MSG_TYPE_PUBLISH packet comes into the mqtt_message_recieved()
> function and gets split between the two callbacks. Why is this split
> instead of sending the topic+data in one callback?

I cannot really answer this. It's just the way the author wrote the code...

> If we have multiple
> subscriptions is it guaranteed that we'll receive an incoming Topic
> callback, then the matching incoming data callback? I think this is the
> case as we're in a single-threaded RAW API context.

From my knowledge of the code, this is guaranteed, yes. Reading the
code, you cannot identify the topic from the 'arg' parameter, or can you?

Regards,
Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]