Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
legaoyi authored Dec 10, 2024
1 parent db75fcf commit 337ff92
Show file tree
Hide file tree
Showing 61 changed files with 575 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
@REM ----------------------------------------------------------------------------
@REM Copyright 2001-2006 The Apache Software Foundation.
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.
@REM ----------------------------------------------------------------------------
@REM
@REM Copyright (c) 2001-2006 The Apache Software Foundation. All rights
@REM reserved.

@echo off

set ERROR_CODE=0

:init
@REM Decide how to startup depending on the version of windows

@REM -- Win98ME
if NOT "%OS%"=="Windows_NT" goto Win9xArg

@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" @setlocal

@REM -- 4NT shell
if "%eval[2+2]" == "4" goto 4NTArgs

@REM -- Regular WinNT shell
set CMD_LINE_ARGS=%*
goto WinNTGetScriptDir

@REM The 4NT Shell from jp software
:4NTArgs
set CMD_LINE_ARGS=%$
goto WinNTGetScriptDir

:Win9xArg
@REM Slurp the command line arguments. This loop allows for an unlimited number
@REM of arguments (up to the command line limit, anyway).
set CMD_LINE_ARGS=
:Win9xApp
if %1a==a goto Win9xGetScriptDir
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto Win9xApp

:Win9xGetScriptDir
set SAVEDIR=%CD%
%0\
cd %0\..\..
set BASEDIR=%CD%
cd %SAVEDIR%
set SAVE_DIR=
goto repoSetup

:WinNTGetScriptDir
set BASEDIR=%~dp0\..

:repoSetup
set REPO=


if "%JAVACMD%"=="" set JAVACMD=java

if "%REPO%"=="" set REPO=%BASEDIR%\lib

set CLASSPATH="%BASEDIR%"\conf;"%REPO%"\*

set ENDORSED_DIR=
if NOT "%ENDORSED_DIR%" == "" set CLASSPATH="%BASEDIR%"\%ENDORSED_DIR%\*;%CLASSPATH%

if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH%

@REM Reaching here means variables are defined and arguments have been captured
:endInit

%JAVACMD% %JAVA_OPTS% -Xms512m -classpath %CLASSPATH% -Dapp.name="startup" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" com.legaoyi.Startup %CMD_LINE_ARGS%
if %ERRORLEVEL% NEQ 0 goto error
goto end

:error
if "%OS%"=="Windows_NT" @endlocal
set ERROR_CODE=%ERRORLEVEL%

:end
@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" goto endNT

@REM For old DOS remove the set variables from ENV - we assume they were not set
@REM before we started - at least we don't leave any baggage around
set CMD_LINE_ARGS=
goto postExec

:endNT
@REM If error code is set to 1 then the endlocal was done already in :error.
if %ERROR_CODE% EQU 0 @endlocal


:postExec

if "%FORCE_EXIT_ON_ERROR%" == "on" (
if %ERROR_CODE% NEQ 0 exit %ERROR_CODE%
)

exit /B %ERROR_CODE%
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------
#
# Copyright (c) 2001-2006 The Apache Software Foundation. All rights
# reserved.


# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done

PRGDIR=`dirname "$PRG"`
BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`

# Reset the REPO variable. If you need to influence this use the environment setup file.
REPO=


# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
Darwin*) darwin=true
if [ -z "$JAVA_VERSION" ] ; then
JAVA_VERSION="CurrentJDK"
else
echo "Using Java version: $JAVA_VERSION"
fi
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
JAVA_HOME=`/usr/libexec/java_home`
else
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
fi
fi
;;
esac

if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# If a specific java binary isn't specified search for the standard 'java' binary
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD=`which java`
fi
fi

if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." 1>&2
echo " We cannot execute $JAVACMD" 1>&2
exit 1
fi

if [ -z "$REPO" ]
then
REPO="$BASEDIR"/lib
fi

CLASSPATH="$BASEDIR"/conf:"$REPO"/*

ENDORSED_DIR=
if [ -n "$ENDORSED_DIR" ] ; then
CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
fi

if [ -n "$CLASSPATH_PREFIX" ] ; then
CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
[ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
[ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
fi

exec "$JAVACMD" $JAVA_OPTS -Xms512m \
-classpath "$CLASSPATH" \
-Dapp.name="startup" \
-Dapp.pid="$$" \
-Dapp.repo="$REPO" \
-Dapp.home="$BASEDIR" \
-Dbasedir="$BASEDIR" \
com.legaoyi.Startup \
"$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

spring.application.name=elink-iov-message-processor

server.port=8080
server.sessionTimeout=30

#---------------------rabbitmq配置start-----------------------------------------------
##rabbitmq配置
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=admin
spring.rabbitmq.password=123456
##spring.rabbitmq.virtualHost=test
#
##是否开启rabbitmq消息持久化特性,开启该特性会减低性能,可提高消息可靠性,平台各个服务配置请保持一致
rabbitmq.message.durable=true
#
##下行消息网关,平台发送消息时,把终端连接的网关id作为路由key,把消息发送到该消息网关即可
rabbitmq.downstream.message.exchange=elink.downstream.message.direct.exchange
#---------------------rabbitmq配置end-----------------------------------------------


##---------------------kafka配置start-----------------------------------------------
##kafka集群所在地址
#spring.kafka.bootstrap-servers=cdh001:9092,cdh002:9092,cdh003:9092
#
## 发生错误后,消息重发的次数。
#spring.kafka.producer.retries=0
## 当有多个消息需要被发送到同一个分区时,生产者会把它们放在同一个批次里。该参数指定了一个批次可以使用的内存大小,按照字节数计算。
#spring.kafka.producer.batch-size=1638400
## 设置生产者内存缓冲区的大小。
#spring.kafka.producer.buffer-memory=33554432
## 键的序列化方式
#spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
## 值的序列化方式
#spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
## acks=0 : 生产者在成功写入消息之前不会等待任何来自服务器的响应。
## acks=1 : 只要集群的首领节点收到消息,生产者就会收到一个来自服务器成功响应。
## acks=all :只有当所有参与复制的节点全部收到消息时,生产者才会收到一个来自服务器的成功响应。
#spring.kafka.producer.acks=1
# #properties:
# #max.request.size: 500000000
# #request.timeout.ms: 60000
#spring.kafka.consumer.group-id=elink-iov-message-processor
## 自动提交的时间间隔 在spring boot 2.X 版本中这里采用的是值的类型为Duration 需要符合特定的格式,如1S,1M,2H,5D
#spring.kafka.consumer.auto-commit-interval=1S
## 该属性指定了消费者在读取一个没有偏移量的分区或者偏移量无效的情况下该作何处理:
## latest(默认值)在偏移量无效的情况下,消费者将从最新的记录开始读取数据(在消费者启动之后生成的记录)
## earliest :在偏移量无效的情况下,消费者将从起始位置读取分区的记录
#spring.kafka.consumer.auto-offset-reset=latest
## 是否自动提交偏移量,默认值是true,为了避免出现重复数据和数据丢失,可以把它设置为false,然后手动提交偏移量
#spring.kafka.consumer.enable-auto-commit=false
#
##max.poll.records条数据需要在session.timeout.ms这个时间内处理完,默认:500
#spring.kafka.consumer.max-poll-records=50
##每次fetch请求时,server应该返回的最小字节数。如果没有足够的数据返回,请求会等待,直到足够的数据才会返回
##spring.kafka.consumer.fetch-min-size=1
##Fetch请求发给broker后,在broker中可能会被阻塞的(当topic中records的总size小于fetch.min.bytes时),此时这个fetch请求耗时就会比较长
##spring.kafka.consumer.fetch-max-wait=1S
#
## 键的反序列化方式
#spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
## 值的反序列化方式
#spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer
## 在侦听器容器中运行的线程数。
#spring.kafka.listener.concurrency=1
# #listner负责ack,每调用一次,就立即commit
#spring.kafka.listener.ack-mode=manual_immediate
#spring.kafka.listener.missing-topics-fatal=false
#
##---------------------kafka配置end----------------------------------------------

#网关序列号,连接该网关处理对应的多媒体文件
elink.gateway.seq=

#终端普通消息上行队列
elink.upstream.common.topic=elink-upstream-common-message

#终端紧急消息上行队列
elink.upstream.urgent.topic=elink-upstream-urgent-message

#终端位置消息上行队列
elink.upstream.gps.topic=elink-upstream-gps-message

#终端多媒体消息上行队列
elink.upstream.media.topic=elink-upstream-media-message

#终端文件消息上行队列,由于文件是临时存放在本地服务器,故该队列必须配合elink-iov-file-message-processor一起使用,当网关不在同一个服务器时,每个网关的队列名称不应相同且每个网关所在的对应服务器上部署一个elink-iov-file-message-processor来监听该队列
elink.upstream.file.topic=elink-upstream-file-message${elink.gateway.seq}
Loading

0 comments on commit 337ff92

Please sign in to comment.