mirror of
https://github.com/nanomq/nanomq.git
synced 2025-06-22 01:57:27 +00:00
* NEW [iceoryx] Add a example to use iceoryx.
Signed-off-by: wanghaemq <wangwei@emqx.io>
This commit is contained in:
@ -661,7 +661,7 @@ server_cb(void *arg)
|
||||
#endif
|
||||
#if defined(SUPP_ICEORYX)
|
||||
if (work->flag == CMD_PUBLISH && work->msg != NULL &&
|
||||
true == nano_iceoryx_topic_filter("fwd/ice",
|
||||
true == nano_iceoryx_topic_filter("ice/fwd",
|
||||
work->pub_packet->var_header.publish.topic_name.body,
|
||||
work->pub_packet->var_header.publish.topic_name.len)) {
|
||||
if (0 != (rv = nano_iceoryx_send_nng_msg(
|
||||
@ -1145,7 +1145,7 @@ broker(conf *nanomq_conf)
|
||||
const char *iceoryx_service = "NanoMQ-Service";
|
||||
const char *iceoryx_instance = "NanoMQ-Instance";
|
||||
const char *iceoryx_event_sub = "topic";
|
||||
const char *iceoryx_event_pub = "fwd/ice";
|
||||
const char *iceoryx_event_pub = "ice/fwd";
|
||||
nng_iceoryx_open(&iceoryx_sock, "NanoMQ-Iceoryx");
|
||||
|
||||
nng_iceoryx_suber *suber;
|
||||
|
@ -7,6 +7,16 @@
|
||||
// found online at https://opensource.org/licenses/MIT.
|
||||
//
|
||||
|
||||
// An example for communicating iceoryx client with nanomq.
|
||||
//
|
||||
// MQTT client -> NanoMQ -> iceoryx client.
|
||||
// nanomq_cli pub -t ice/fwd -m aaa
|
||||
// nanomq_cli iceoryx submqtt ss NanoMQ-Service NanoMQ-Instance ice/fwd
|
||||
//
|
||||
// iceoryx client -> NanoMQ -> MQTT client.
|
||||
// nanomq_cli iceoryx pubmqtt pp NanoMQ-Service NanoMQ-Instance topic acc
|
||||
// nanomq_cli sub -t topic
|
||||
|
||||
#if defined(SUPP_ICEORYX)
|
||||
|
||||
#include "nng/nng.h"
|
||||
|
Reference in New Issue
Block a user