public void setSendMessageWithVIPChannel(final boolean sendMessageWithVIPChannel) { this.setVipChannelEnabled(sendMessageWithVIPChannel); }
public void setSendMessageWithVIPChannel(final boolean sendMessageWithVIPChannel) { this.setVipChannelEnabled(sendMessageWithVIPChannel); }
public static DefaultMQProducer getTraceDispatcherProducer(Properties properties, SessionCredentials sessionCredentials) { if (traceProducer == null) { String accessKey = properties.getProperty(OnsTraceConstants.AccessKey); traceProducer = new DefaultMQProducer(new ClientRPCHook(sessionCredentials)); traceProducer.setProducerGroup(accessKey.replace('.', '-') + OnsTraceConstants.groupName); traceProducer.setSendMsgTimeout(5000); traceProducer.setInstanceName(properties.getProperty(OnsTraceConstants.InstanceName, String.valueOf(System.currentTimeMillis()))); String nameSrv = properties.getProperty(OnsTraceConstants.NAMESRV_ADDR); if (nameSrv == null) { TopAddressing topAddressing = new TopAddressing(properties.getProperty(OnsTraceConstants.ADDRSRV_URL)); nameSrv = topAddressing.fetchNSAddr(); } traceProducer.setNamesrvAddr(nameSrv); traceProducer.setVipChannelEnabled(false); // 消息最大大小128K int maxSize = Integer.parseInt(properties.getProperty(OnsTraceConstants.MaxMsgSize, "128000")); traceProducer.setMaxMessageSize(maxSize - 10 * 1000); } return traceProducer; }
traceProducer.setVipChannelEnabled(false);
public static DefaultMQProducer getTraceDispatcherProducer(Properties properties) { if (traceProducer == null) { SessionCredentials sessionCredentials = new SessionCredentials(); Properties sessionProperties = new Properties(); String accessKey = properties.getProperty(OnsTraceConstants.AccessKey); String secretKey = properties.getProperty(OnsTraceConstants.SecretKey); sessionProperties.put(OnsTraceConstants.AccessKey, accessKey); sessionProperties.put(OnsTraceConstants.SecretKey, secretKey); sessionCredentials.updateContent(sessionProperties); traceProducer = new DefaultMQProducer(new ClientRPCHook(sessionCredentials)); traceProducer.setProducerGroup(accessKey + OnsTraceConstants.groupName); traceProducer.setSendMsgTimeout(5000); traceProducer.setInstanceName(properties.getProperty(OnsTraceConstants.InstanceName, String.valueOf(System.currentTimeMillis()))); String nameSrv = properties.getProperty(OnsTraceConstants.NAMESRV_ADDR); if (nameSrv == null) { TopAddressing topAddressing = new TopAddressing(properties.getProperty(OnsTraceConstants.ADDRSRV_URL)); nameSrv = topAddressing.fetchNSAddr(); } traceProducer.setNamesrvAddr(nameSrv); traceProducer.setVipChannelEnabled(false); // 消息最大大小128K int maxSize = Integer.parseInt(properties.getProperty(OnsTraceConstants.MaxMsgSize, "128000")); traceProducer.setMaxMessageSize(maxSize - 10 * 1000); } return traceProducer; }
traceProducer.setVipChannelEnabled(false);
defaultMQProducer.setVipChannelEnabled(isVipChannelEnabled);