You can set the broker to SYNC. The message that needs to be replicated/flushed 
can be guaranteed with the method msg.setWaitStoreMsgOK(true); otherwise the 
message is returned just after append to master's commitLog. The default 
message is set to waitStoreMsgOK.
You can refer to 
common/src/main/java/org/apache/rocketmq/common/message/Message.java 
andstore/src/main/java/org/apache/rocketmq/store/CommitLog.java for details.
________________________________
发件人: 秦美杰 <[email protected]>
发送时间: 2019年8月27日 14:39
收件人: users <[email protected]>
主题: 回复:is it possible to configure FLUSH_TYPE by topic?

Hey guys,

I have a RocketMQ cluster setup, it has 3 masters and 3 slaves, plus 2 name 
servers, all with flushDiskType and brokerRole set to ASYNC, because it's only 
used for message notification which requires no reliability guarentee.

Now, I plan to use RocketMQ to publish cache invalidation notification which is 
super important, and one single message lost is intolerant, so obiviously I 
should set both flushDiskType and brokerRole set to SYNC.

but it seems that there's no way to configure the forementioned options by 
topic, the only option RocketMQ offers is ALL or NOTHING.

I really don't want to setup an another RocketMQ cluster, is there anyone can 
shed some light on ?

Thanks in advance,

Best regards,

meijie.qin/秦美杰
移康智能科技(上海)股份有限公司

Shanghai Eques Technology Co., Limited

=======================================

地址:上海市闵行区春东路508号A栋205-210室

手机:+86-13127991566

网址:www.eques.cn<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eques.com.cn%2F&data=02%7C01%7C%7C9c811f0023d5454cc9cb08d72ab963d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637024848041328536&sdata=fi6zJJOAr6mRfbPdgUUWRH47yRjdfemtvOMv905GLK4%3D&reserved=0>



Reply via email to