use of com.jd.blockchain.consensus.mq.settings.MsgQueueConsensusSettings in project jdchain-core by blockchain-jd-com.
the class ParticipantManagerService4MQ method initBlockQueue.
/**
* 初始化区块队列
*
* @param context
* @param nodeId
* @throws Exception
*/
private void initBlockQueue(ParticipantContext context, int nodeId) throws Exception {
MsgQueueConsensusSettings consensusSettings = (MsgQueueConsensusSettings) getConsensusSetting(context);
String server = consensusSettings.getNetworkSettings().getServer();
String blockTopic = consensusSettings.getNetworkSettings().getBlockTopic();
MsgQueueConsumer blockConsumer = MsgQueueFactory.newConsumer(nodeId, server, blockTopic, true);
blockConsumer.connect(null);
blockConsumer.start();
blockConsumer.close();
}
Aggregations