18 #include "hazelcast/client/proxy/ITopicImpl.h"
19 #include "hazelcast/client/topic/impl/TopicEventHandlerImpl.h"
39 class itopic :
public proxy::ITopicImpl {
40 friend class spi::ProxyManager;
43 static constexpr
const char *SERVICE_NAME =
"hz:impl:topicService";
51 boost::future<void>
publish(
const E &message) {
52 return proxy::ITopicImpl::publish(to_data<E>(message));
71 return proxy::ITopicImpl::add_message_listener(
72 std::shared_ptr<impl::BaseEventHandler>(
new topic::impl::TopicEventHandlerImpl(get_name(),
73 get_context().get_client_cluster_service(),
74 get_context().get_serialization_service(),
75 std::move(listener))));
79 itopic(
const std::string &instance_name, spi::ClientContext *context)
80 : proxy::ITopicImpl(instance_name, context) {}
Hazelcast provides distribution mechanism for publishing messages that are delivered to multiple subs...
boost::future< void > publish(const E &message)
Publishes the message to all subscribers of this topic.
boost::future< boost::uuids::uuid > add_message_listener(topic::listener &&listener)
Subscribe to this topic.
Listen to messages from an ITopic.