Hi,
I've been working on Pub/Sub-style communication on Cap'n Proto. Currently
I have ported the Rust-based example
<https://github.com/capnproto/capnproto-rust/tree/master/capnp-rpc/examples/pubsub>
to C++, and achieved cross-language Pub/Sub.
However, this demo implementation only allows for subscribing to a specific
data type, not to a specific topic name.
@0xce579c3e9bb684bd;
interface Subscription {}
interface Publisher(T) {
# A source of messages of type T.
subscribe @0 (subscriber: Subscriber(T)) -> (subscription:
Subscription);
# Registers `subscriber` to receive published messages. Dropping the
returned `subscription`
# signals to the `Publisher` that the subscriber is no longer
interested in receiving messages.
}
interface Subscriber(T) {
pushMessage @0 (message: T) -> ();
# Sends a message from a publisher to the subscriber. To help with flow
control, the subscriber should not
# return from this method until it is ready to process the next message.
}
Any idea on how to add the concept of "topic" in the "Cap'n Proto" style?
Deeply thanks for your help,
Fan Jiang
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.