feat: add split service entrypoints
This commit is contained in:
@@ -46,5 +46,21 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>gb32960-ingest-app</finalName>
|
<finalName>gb32960-ingest-app</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<jvmArguments>--sun-misc-unsafe-memory-access=allow</jvmArguments>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.lingniu.ingest.gb32960app;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication(scanBasePackages = "com.lingniu.ingest")
|
||||||
|
public class Gb32960IngestApplication {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(Gb32960IngestApplication.class);
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
SpringApplication.run(Gb32960IngestApplication.class, args);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
log.error("GB32960 ingest application failed to start, forcing JVM exit", t);
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: gb32960-ingest-app
|
||||||
|
threads:
|
||||||
|
virtual:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: ${HTTP_PORT:20100}
|
||||||
|
|
||||||
|
lingniu:
|
||||||
|
ingest:
|
||||||
|
gb32960:
|
||||||
|
enabled: true
|
||||||
|
port: ${GB32960_PORT:32960}
|
||||||
|
boss-threads: ${GB32960_BOSS_THREADS:1}
|
||||||
|
worker-threads: ${GB32960_WORKER_THREADS:0}
|
||||||
|
auth:
|
||||||
|
enabled: ${GB32960_AUTH_ENABLED:false}
|
||||||
|
case-sensitive: false
|
||||||
|
whitelist: []
|
||||||
|
platforms:
|
||||||
|
- username: ${GB32960_PLATFORM_USER_HYUNDAI:Hyundai}
|
||||||
|
password: ${GB32960_PLATFORM_PWD_HYUNDAI:f2e3445d7cda409fb4f278f6fb890734}
|
||||||
|
allowed-ips:
|
||||||
|
- ${GB32960_PLATFORM_IP_HYUNDAI:8.134.95.166}
|
||||||
|
description: 外部下级平台 - Hyundai
|
||||||
|
tls:
|
||||||
|
enabled: ${GB32960_TLS_ENABLED:false}
|
||||||
|
cert-path: ${GB32960_TLS_CERT:}
|
||||||
|
key-path: ${GB32960_TLS_KEY:}
|
||||||
|
trust-cert-path: ${GB32960_TLS_CA:}
|
||||||
|
require-client-auth: true
|
||||||
|
vendor-extensions:
|
||||||
|
- name: guangdong-fc
|
||||||
|
match:
|
||||||
|
platform-accounts:
|
||||||
|
- Hyundai
|
||||||
|
vin-prefixes: []
|
||||||
|
vins: []
|
||||||
|
parse:
|
||||||
|
lenient-block-failure: true
|
||||||
|
diagnostics:
|
||||||
|
max-logged-frame-keys-per-channel: ${GB32960_DIAGNOSTICS_MAX_LOGGED_FRAME_KEYS_PER_CHANNEL:4096}
|
||||||
|
pipeline:
|
||||||
|
disruptor:
|
||||||
|
ring-buffer-size: ${PIPELINE_RING_BUFFER_SIZE:131072}
|
||||||
|
wait-strategy: ${PIPELINE_WAIT_STRATEGY:yielding}
|
||||||
|
producer-type: multi
|
||||||
|
dedup:
|
||||||
|
enabled: true
|
||||||
|
cache-size: 200000
|
||||||
|
ttl-seconds: 600
|
||||||
|
rate-limit:
|
||||||
|
per-vin-qps: 50
|
||||||
|
session:
|
||||||
|
store: ${SESSION_STORE:memory}
|
||||||
|
ttl: ${SESSION_TTL:30m}
|
||||||
|
identity:
|
||||||
|
store: ${VEHICLE_IDENTITY_STORE:file}
|
||||||
|
file:
|
||||||
|
path: ${VEHICLE_IDENTITY_FILE:./data/vehicle-identity.jsonl}
|
||||||
|
sink:
|
||||||
|
mq:
|
||||||
|
enabled: ${KAFKA_ENABLED:true}
|
||||||
|
type: kafka
|
||||||
|
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
|
||||||
|
compression-type: zstd
|
||||||
|
linger-ms: 20
|
||||||
|
batch-size: 65536
|
||||||
|
acks: all
|
||||||
|
enable-idempotence: true
|
||||||
|
node-id: ${KAFKA_NODE_ID:gb32960-ingest-local}
|
||||||
|
topics:
|
||||||
|
realtime: ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
location: ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
alarm: ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
session: ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
media-meta: ${KAFKA_TOPIC_MEDIA_META:vehicle.media.meta.v1}
|
||||||
|
raw-archive: ${KAFKA_TOPIC_GB32960_RAW:vehicle.raw.gb32960.v1}
|
||||||
|
dlq: ${KAFKA_TOPIC_GB32960_DLQ:vehicle.dlq.gb32960.v1}
|
||||||
|
consumer:
|
||||||
|
enabled: false
|
||||||
|
event-file-store:
|
||||||
|
enabled: false
|
||||||
|
event-history:
|
||||||
|
enabled: false
|
||||||
|
vehicle-state:
|
||||||
|
enabled: false
|
||||||
|
vehicle-stat:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: health,info,metrics,prometheus,env
|
||||||
|
health:
|
||||||
|
redis:
|
||||||
|
enabled: ${MANAGEMENT_HEALTH_REDIS_ENABLED:false}
|
||||||
|
metrics:
|
||||||
|
tags:
|
||||||
|
application: gb32960-ingest-app
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
root: INFO
|
||||||
|
com.lingniu.ingest: INFO
|
||||||
@@ -46,5 +46,21 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>vehicle-analytics-app</finalName>
|
<finalName>vehicle-analytics-app</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<jvmArguments>--sun-misc-unsafe-memory-access=allow</jvmArguments>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.lingniu.ingest.analyticsapp;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication(scanBasePackages = "com.lingniu.ingest")
|
||||||
|
public class VehicleAnalyticsApplication {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(VehicleAnalyticsApplication.class);
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
SpringApplication.run(VehicleAnalyticsApplication.class, args);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
log.error("Vehicle analytics application failed to start, forcing JVM exit", t);
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: vehicle-analytics-app
|
||||||
|
threads:
|
||||||
|
virtual:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: ${HTTP_PORT:20300}
|
||||||
|
|
||||||
|
lingniu:
|
||||||
|
ingest:
|
||||||
|
gb32960:
|
||||||
|
enabled: false
|
||||||
|
sink:
|
||||||
|
mq:
|
||||||
|
enabled: ${KAFKA_ENABLED:true}
|
||||||
|
type: kafka
|
||||||
|
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
|
||||||
|
topics:
|
||||||
|
realtime: ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
dlq: ${KAFKA_TOPIC_GB32960_DLQ:vehicle.dlq.gb32960.v1}
|
||||||
|
consumer:
|
||||||
|
enabled: ${KAFKA_CONSUMER_ENABLED:true}
|
||||||
|
client-id-prefix: ${KAFKA_CONSUMER_CLIENT_ID_PREFIX:vehicle-analytics}
|
||||||
|
auto-offset-reset: ${KAFKA_CONSUMER_AUTO_OFFSET_RESET:earliest}
|
||||||
|
max-poll-records: ${KAFKA_CONSUMER_MAX_POLL_RECORDS:500}
|
||||||
|
bindings:
|
||||||
|
vehicleStateEnvelopeConsumerProcessor:
|
||||||
|
enabled: ${VEHICLE_STATE_ENABLED:false}
|
||||||
|
group-id: ${KAFKA_GROUP_STATE:vehicle-state}
|
||||||
|
topics:
|
||||||
|
- ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
vehicleStatEnvelopeConsumerProcessor:
|
||||||
|
enabled: ${VEHICLE_STAT_ENABLED:true}
|
||||||
|
group-id: ${KAFKA_GROUP_STAT:vehicle-stat}
|
||||||
|
topics:
|
||||||
|
- ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
archive:
|
||||||
|
enabled: false
|
||||||
|
event-file-store:
|
||||||
|
enabled: false
|
||||||
|
event-history:
|
||||||
|
enabled: false
|
||||||
|
vehicle-state:
|
||||||
|
enabled: ${VEHICLE_STATE_ENABLED:false}
|
||||||
|
vehicle-stat:
|
||||||
|
enabled: ${VEHICLE_STAT_ENABLED:true}
|
||||||
|
file-path: ${VEHICLE_STAT_FILE_PATH:./target/vehicle-stat/}
|
||||||
|
zone-id: ${VEHICLE_STAT_ZONE_ID:Asia/Shanghai}
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: health,info,metrics,prometheus,env
|
||||||
|
health:
|
||||||
|
redis:
|
||||||
|
enabled: ${MANAGEMENT_HEALTH_REDIS_ENABLED:false}
|
||||||
|
metrics:
|
||||||
|
tags:
|
||||||
|
application: vehicle-analytics-app
|
||||||
@@ -54,5 +54,21 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>vehicle-history-app</finalName>
|
<finalName>vehicle-history-app</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<jvmArguments>--sun-misc-unsafe-memory-access=allow</jvmArguments>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.lingniu.ingest.historyapp;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication(scanBasePackages = "com.lingniu.ingest")
|
||||||
|
public class VehicleHistoryApplication {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(VehicleHistoryApplication.class);
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
SpringApplication.run(VehicleHistoryApplication.class, args);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
log.error("Vehicle history application failed to start, forcing JVM exit", t);
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: vehicle-history-app
|
||||||
|
threads:
|
||||||
|
virtual:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: ${HTTP_PORT:20200}
|
||||||
|
|
||||||
|
lingniu:
|
||||||
|
ingest:
|
||||||
|
gb32960:
|
||||||
|
enabled: false
|
||||||
|
sink:
|
||||||
|
mq:
|
||||||
|
enabled: ${KAFKA_ENABLED:true}
|
||||||
|
type: kafka
|
||||||
|
bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
|
||||||
|
topics:
|
||||||
|
realtime: ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
raw-archive: ${KAFKA_TOPIC_GB32960_RAW:vehicle.raw.gb32960.v1}
|
||||||
|
dlq: ${KAFKA_TOPIC_GB32960_DLQ:vehicle.dlq.gb32960.v1}
|
||||||
|
consumer:
|
||||||
|
enabled: ${KAFKA_CONSUMER_ENABLED:true}
|
||||||
|
client-id-prefix: ${KAFKA_CONSUMER_CLIENT_ID_PREFIX:vehicle-history}
|
||||||
|
auto-offset-reset: ${KAFKA_CONSUMER_AUTO_OFFSET_RESET:earliest}
|
||||||
|
max-poll-records: ${KAFKA_CONSUMER_MAX_POLL_RECORDS:500}
|
||||||
|
bindings:
|
||||||
|
eventHistoryEnvelopeConsumerProcessor:
|
||||||
|
enabled: true
|
||||||
|
group-id: ${KAFKA_GROUP_HISTORY:vehicle-history}
|
||||||
|
topics:
|
||||||
|
- ${KAFKA_TOPIC_GB32960_EVENT:vehicle.event.gb32960.v1}
|
||||||
|
- ${KAFKA_TOPIC_GB32960_RAW:vehicle.raw.gb32960.v1}
|
||||||
|
archive:
|
||||||
|
enabled: ${SINK_ARCHIVE_ENABLED:true}
|
||||||
|
type: local
|
||||||
|
path: ${SINK_ARCHIVE_PATH:./archive/}
|
||||||
|
event-file-store:
|
||||||
|
enabled: ${EVENT_FILE_STORE_ENABLED:true}
|
||||||
|
path: ${EVENT_FILE_STORE_PATH:./target/event-store/}
|
||||||
|
zone-id: ${EVENT_FILE_STORE_ZONE_ID:Asia/Shanghai}
|
||||||
|
batch-size: ${EVENT_FILE_STORE_BATCH_SIZE:500}
|
||||||
|
flush-interval-millis: ${EVENT_FILE_STORE_FLUSH_INTERVAL_MILLIS:1000}
|
||||||
|
event-history:
|
||||||
|
enabled: true
|
||||||
|
vehicle-state:
|
||||||
|
enabled: false
|
||||||
|
vehicle-stat:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: health,info,metrics,prometheus,env
|
||||||
|
health:
|
||||||
|
redis:
|
||||||
|
enabled: ${MANAGEMENT_HEALTH_REDIS_ENABLED:false}
|
||||||
|
metrics:
|
||||||
|
tags:
|
||||||
|
application: vehicle-history-app
|
||||||
Reference in New Issue
Block a user