com.aliyun.openservices.aliyun.log.producer.Producer Java Examples
The following examples show how to use
com.aliyun.openservices.aliyun.log.producer.Producer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FlinkLogProducer.java From aliyun-log-flink-connector with Apache License 2.0 | 6 votes |
private Producer createProducer(ConfigWrapper configWrapper) { ProducerConfig producerConfig = new ProducerConfig(); producerConfig.setLingerMs(configWrapper.getInt(FLUSH_INTERVAL_MS, ProducerConfig.DEFAULT_LINGER_MS)); producerConfig.setRetries(configWrapper.getInt(MAX_RETRIES, ProducerConfig.DEFAULT_RETRIES)); producerConfig.setBaseRetryBackoffMs( configWrapper.getLong(BASE_RETRY_BACK_OFF_TIME_MS, ProducerConfig.DEFAULT_BASE_RETRY_BACKOFF_MS)); producerConfig.setMaxRetryBackoffMs( configWrapper.getLong(MAX_RETRY_BACK_OFF_TIME_MS, ProducerConfig.DEFAULT_MAX_RETRY_BACKOFF_MS)); producerConfig.setMaxBlockMs( configWrapper.getLong(MAX_BLOCK_TIME_MS, ProducerConfig.DEFAULT_MAX_BLOCK_MS)); producerConfig.setIoThreadCount( configWrapper.getInt(IO_THREAD_NUM, ProducerConfig.DEFAULT_IO_THREAD_COUNT)); Producer producer = new LogProducer(producerConfig); ProjectConfig config = new ProjectConfig(project, configWrapper.getString(ConfigConstants.LOG_ENDPOINT), configWrapper.getString(ConfigConstants.LOG_ACCESSSKEYID), configWrapper.getString(ConfigConstants.LOG_ACCESSKEY)); producer.putProjectConfig(config); return producer; }
Example #2
Source File: LoghubAppender.java From aliyun-log-logback-appender with Apache License 2.0 | 4 votes |
public Producer createProducer() { projectConfig = buildProjectConfig(); Producer producer = new LogProducer(producerConfig); producer.putProjectConfig(projectConfig); return producer; }
Example #3
Source File: LoghubAppender.java From aliyun-log-log4j-appender with Apache License 2.0 | 4 votes |
public Producer createProducer() { projectConfig = buildProjectConfig(); Producer producer = new LogProducer(producerConfig); producer.putProjectConfig(projectConfig); return producer; }