Double RPC mqtt messages?

Am I seeing double?
When I publish a RPC message via MQTT I see two messages in system log , I don’t see the same issue when I send via http (curl)
curl “http://192.168.0.103/rpc/relay” -d “{“name”:“RELAY1”, “cmd”: “SWITCH”}”
{“msg”:“ok”,“status”:“true”}

eg
mosquitto_pub -h mybroker -t esp32_8AD88C/rpc -m '{“method”:“relay”,“args”:{“name”:“TEST1”}}'

system log:

 [Sep 19 13:07:41.718] mg_rpc.c:310            relay via MQTT 
 [Sep 19 13:07:41.718] args: {"name":"TEST1"} 
 [Sep 19 13:07:41.718] mg_rpc.c:310            relay via MQTT 
 [Sep 19 13:07:41.718] args: {"name":"TEST1"} 

mjs : program …

// Load Mongoose OS API
load('api_timer.js');
load('api_gpio.js');
load('api_mqtt.js');
load('api_net.js');
load('api_config.js');
load('api_rpc.js');


RPC.addHandler('relay', function(args) {

   let rc=true;
   print("args:",JSON.stringify(args));
 
  return {"status": rc  };
});


// check if MQTT connection establised and sent init
MQTT.setEventHandler(function(conn, ev, edata) 	{
	//check if connection to MQTT established
		if(ev === MQTT.EV_CONNACK)	{
		  print('MQTT Connected');
	  
		}
	}, null);

also sending issue?? I don’t see any response via the “src” channel.

eg
mosquitto_pub -h mythbox -t esp32_8AD88C/rpc -m ‘{“src”:“out-topic”,“method”:“relay”,“args”:{“name”:“RELAY1”,“cmd”:“SWITCH”}}’

should I see out on mqtt channel: out-topic/rpc ??

You are missing the ‘id’ key. According to my understanding, there won’t be a response if there is no command id.
The docs show the use of ‘params’ instead of ‘args’. I don’t know if this will affect operation, there is this comment in the sources: /* Note: at present we allow both args and params, but args is deprecated. */
When I wrote this article (in Spanish), everything worked fine.
Which version are you using ?

working now… documentation wasn’t quiet clear on the meaning of those extra values and it appears it hasn’t been updated in a while.
thanks

Question version?
I think its Mongoose 6.18, LwIP 2.1.3 according to the boot messages is there another way to tell?

How do I compile with latest version?

Latest version of what?

The latest release version of mos is 2.19.1.
If you want to use the latest versions of Mongoose OS and libraries, switch to mos latest:

mos update latest

just adding this for future referance
change the following config
"rpc.mqtt.sub_wc", false

or
mos config-set rpc.mqtt.sub_wc=false