Comments (3)
- you just call topic_filter multiple time, sink.subscribe().topic_filter(“topic1”).topic_filter(“topic2”) etc
- post compilation error, you may need to do something like fn_service(move |…
btw this is for discussions rather than issues
from ntex-mqtt.
- you just call topic_filter multiple time, sink.subscribe().topic_filter(“topic1”).topic_filter(“topic2”) etc
- post compilation error, you may need to do something like fn_service(move |…
btw this is for discussions rather than issues
Thank you!!! yes, the fn_service(move |
works. One more question:
The publish.ack(Success)
consumes the entire publish
but indeed it only needs the packet_id
. I have to copy topic
and payload
when I want to send the content out.
Is there an API like: pub fn ack(&self, reason_code: codec::PublishAckReason) -> ControlResult
which doesn't need the entire publish
to create a control message? The current API is: pub fn ack(self, reason_code: codec::PublishAckReason) -> ControlResult
.
v5::client::ControlMessage::Publish(publish) => {
log::info!(
"incoming publish: {:?} -> {:?} payload {:?}",
publish.packet().packet_id,
publish.packet().topic,
publish.packet().payload
);
let res = publish.ack(v5::codec::PublishAckReason::Success); // the publish is consumed here.
if let Err(e) = tx.send(publish) { //can't send it anymore.
log::error!("Error sending publish: {:?}", e);
}
Ready::Ok(res)
}
from ntex-mqtt.
close and move to discussion.
from ntex-mqtt.
Related Issues (20)
- Subscribe packet is malformed when a subscription identifier is specified HOT 2
- connect to "broker-cn.emqx.io:8883"/"54.87.92.106:8883" fail by openssl HOT 2
- Expose full MQTT packet length HOT 1
- Possible session leak HOT 3
- How to define return type of `v3::MqttServer::new` HOT 6
- mqtt-ws-server.rs for ws HOT 2
- generic associated types are unstable HOT 1
- unresolved import `crate::rt::Signal` HOT 1
- How to connect using a username and password HOT 2
- not found in `crate::rt` HOT 3
- Compilation failed HOT 4
- mqtt-ws-server.rs ws connection fail
- Issues with keep-alive after updating from 0.9 to 0.12 HOT 17
- Troubles upgrade to 0.8.x HOT 4
- can i used to my server for Distributed MQTT Message Broker HOT 2
- v0.8.3 Linux compilation failed HOT 1
- SubscribeAckReason enum has a typo HOT 2
- PubAckReason enum contains ReceiveMaximumExceeded HOT 1
- Subs.rs example uses .subscribe() which is unlisted in docs as opposed to .confirm() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntex-mqtt.