18 #include "hazelcast/client/proxy/ITopicImpl.h"
19 #include "hazelcast/client/topic/impl/TopicEventHandlerImpl.h"
42 class itopic :
public proxy::ITopicImpl
44 friend class spi::ProxyManager;
47 static constexpr
const char* SERVICE_NAME =
"hz:impl:topicService";
55 boost::future<void>
publish(
const E& message)
57 return proxy::ITopicImpl::publish(to_data<E>(message));
78 return proxy::ITopicImpl::add_message_listener(
79 std::shared_ptr<impl::BaseEventHandler>(
80 new topic::impl::TopicEventHandlerImpl(
82 get_context().get_client_cluster_service(),
83 get_context().get_serialization_service(),
84 std::move(listener))));
88 itopic(
const std::string& instance_name, spi::ClientContext* context)
89 : 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.