ReliableTopic and RingBuffer name association

8 views
Skip to first unread message

Rakesh Sharma

unread,
Sep 17, 2021, 9:04:31 AM9/17/21
to Hazelcast
I create a small start Hazelcast instance with following code as per docs RingBuffer name and Reliable topic name should be same but that does not work instead adding following prefix while getting prefix RingbufferService.TOPIC_RB_PREFIX provides the correct stats of RingBuffer like tailSequence. 
Is there way to keep name same for ReliableTopic and RingBuffer?
=================
Config config = Config.load();
Map mapConfigs= config.getMapConfigs();
MemberAttributeConfig m= new MemberAttributeConfig();
HazelcastInstance hz= Hazelcast.newHazelcastInstance();
ITopic<String> rt= hz.getReliableTopic("rb");
rt.publish("Rakesh");
rt.publish("Rakesh1");
Ringbuffer<String> rb= hz.getRingbuffer(RingbufferService.TOPIC_RB_PREFIX+"rb");

System.out.println(rb.tailSequence());//prints 1 ---> correct value
Ringbuffer<String> rb1= hz.getRingbuffer("rb");
System.out.println(rb1.tailSequence());///prints -1--->
============

Reply all
Reply to author
Forward
0 new messages