Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
Rocketmq
提交
8ab9aef0
R
Rocketmq
项目概览
s920243400
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
8ab9aef0
编写于
4月 15, 2019
作者:
Z
ziyilin
提交者:
dinglei
4月 15, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[graal] Successfully run with main method (#1158)
上级
9de6cb78
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
183 addition
and
7 deletion
+183
-7
client/config/reflect-config.json
client/config/reflect-config.json
+170
-0
client/src/main/java/org/apache/rocketmq/client/Producer.java
...nt/src/main/java/org/apache/rocketmq/client/Producer.java
+4
-1
client/svm.sh
client/svm.sh
+9
-6
未找到文件。
client/config/reflect-config.json
0 → 100644
浏览文件 @
8ab9aef0
[
{
"name"
:
"[B"
},
{
"name"
:
"[J"
},
{
"name"
:
"[Ljava.lang.Object;"
},
{
"name"
:
"io.netty.channel.socket.nio.NioSocketChannel"
,
"methods"
:[{
"name"
:
"<init>"
,
"parameterTypes"
:[]
}]
},
{
"name"
:
"java.beans.Transient"
},
{
"name"
:
"java.lang.Byte"
},
{
"name"
:
"java.lang.Class"
},
{
"name"
:
"java.lang.Comparable"
,
"allPublicMethods"
:
true
},
{
"name"
:
"java.lang.Float"
},
{
"name"
:
"java.lang.Integer"
},
{
"name"
:
"java.lang.Long"
},
{
"name"
:
"java.lang.Object"
},
{
"name"
:
"java.lang.String"
,
"fields"
:[{
"name"
:
"value"
}]
},
{
"name"
:
"java.lang.System"
},
{
"name"
:
"java.nio.Bits"
,
"methods"
:[{
"name"
:
"unaligned"
,
"parameterTypes"
:[]
}]
},
{
"name"
:
"java.nio.Buffer"
,
"fields"
:[{
"name"
:
"address"
}]
},
{
"name"
:
"java.nio.DirectByteBuffer"
,
"fields"
:[{
"name"
:
"cleaner"
}],
"methods"
:[{
"name"
:
"<init>"
,
"parameterTypes"
:[
"long"
,
"int"
]
}]
},
{
"name"
:
"java.nio.file.Path"
},
{
"name"
:
"org.apache.rocketmq.common.protocol.header.SendMessageRequestHeaderV2"
,
"allDeclaredFields"
:
true
},
{
"name"
:
"org.apache.rocketmq.common.protocol.header.SendMessageResponseHeader"
,
"allDeclaredFields"
:
true
,
"methods"
:[{
"name"
:
"<init>"
,
"parameterTypes"
:[]
}]
},
{
"name"
:
"org.apache.rocketmq.common.protocol.header.UnregisterClientRequestHeader"
,
"allDeclaredFields"
:
true
},
{
"name"
:
"org.apache.rocketmq.common.protocol.header.namesrv.GetRouteInfoRequestHeader"
,
"allDeclaredFields"
:
true
},
{
"name"
:
"org.apache.rocketmq.common.protocol.heartbeat.HeartbeatData"
,
"allDeclaredFields"
:
true
,
"allPublicFields"
:
true
,
"allPublicMethods"
:
true
},
{
"name"
:
"org.apache.rocketmq.common.protocol.heartbeat.ProducerData"
,
"allDeclaredFields"
:
true
,
"allPublicFields"
:
true
,
"allPublicMethods"
:
true
},
{
"name"
:
"org.apache.rocketmq.common.protocol.route.BrokerData"
,
"allDeclaredFields"
:
true
,
"allDeclaredConstructors"
:
true
,
"allPublicFields"
:
true
,
"allPublicMethods"
:
true
},
{
"name"
:
"org.apache.rocketmq.common.protocol.route.QueueData"
,
"allDeclaredFields"
:
true
,
"allDeclaredConstructors"
:
true
,
"allPublicFields"
:
true
,
"allPublicMethods"
:
true
},
{
"name"
:
"org.apache.rocketmq.common.protocol.route.TopicRouteData"
,
"allDeclaredFields"
:
true
,
"allDeclaredConstructors"
:
true
,
"allPublicFields"
:
true
,
"allPublicMethods"
:
true
},
{
"name"
:
"org.apache.rocketmq.remoting.protocol.LanguageCode"
,
"fields"
:[
{
"name"
:
"CPP"
},
{
"name"
:
"DELPHI"
},
{
"name"
:
"DOTNET"
},
{
"name"
:
"ERLANG"
},
{
"name"
:
"GO"
},
{
"name"
:
"HTTP"
},
{
"name"
:
"JAVA"
},
{
"name"
:
"OMS"
},
{
"name"
:
"OTHER"
},
{
"name"
:
"PHP"
},
{
"name"
:
"PYTHON"
},
{
"name"
:
"RUBY"
}
]
},
{
"name"
:
"org.apache.rocketmq.remoting.protocol.RemotingCommand"
,
"allDeclaredFields"
:
true
,
"allDeclaredConstructors"
:
true
,
"allPublicFields"
:
true
,
"allPublicMethods"
:
true
},
{
"name"
:
"org.apache.rocketmq.remoting.protocol.RemotingSerializable"
,
"allDeclaredFields"
:
true
,
"allPublicMethods"
:
true
},
{
"name"
:
"org.apache.rocketmq.remoting.protocol.SerializeType"
,
"fields"
:[
{
"name"
:
"JSON"
},
{
"name"
:
"ROCKETMQ"
}
]
},
{
"name"
:
"sun.misc.Cleaner"
,
"methods"
:[{
"name"
:
"clean"
,
"parameterTypes"
:[]
}]
},
{
"name"
:
"sun.misc.Unsafe"
,
"fields"
:[{
"name"
:
"theUnsafe"
}],
"methods"
:[{
"name"
:
"copyMemory"
,
"parameterTypes"
:[
"java.lang.Object"
,
"long"
,
"java.lang.Object"
,
"long"
,
"long"
]
}]
},
{
"name"
:
"sun.misc.VM"
,
"methods"
:[{
"name"
:
"maxDirectMemory"
,
"parameterTypes"
:[]
}]
},
{
"name"
:
"sun.nio.ch.SelectorImpl"
,
"fields"
:[
{
"name"
:
"publicSelectedKeys"
},
{
"name"
:
"selectedKeys"
}
]
}
]
client/src/main/java/org/apache/rocketmq/client/Producer.java
浏览文件 @
8ab9aef0
...
...
@@ -8,13 +8,16 @@ import org.apache.rocketmq.client.producer.DefaultMQProducer;
import
org.apache.rocketmq.client.producer.SendResult
;
import
org.apache.rocketmq.common.message.Message
;
import
org.apache.rocketmq.remoting.common.RemotingHelper
;
import
com.alibaba.fastjson.parser.ParserConfig
;
import
io.netty.handler.logging.LoggingHandler
;
import
io.netty.handler.logging.LogLevel
;
public
class
Producer
{
private
static
final
LoggingHandler
log
=
new
LoggingHandler
(
LogLevel
.
DEBUG
);
public
static
void
main
(
String
[]
args
)
throws
MQClientException
,
InterruptedException
{
ParserConfig
.
global
.
setAsmEnable
(
false
);
DefaultMQProducer
producer
=
new
DefaultMQProducer
(
"ProducerGroupName"
);
producer
.
start
();
...
...
client/svm.sh
浏览文件 @
8ab9aef0
#!/bin/bash
SVM_OPT
=
"--allow-incomplete-classpath --report-unsupported-elements-at-runtime"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=com.alibaba.fastjson.serializer.JodaCodec"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=io.netty.handler.ssl.JdkNpnApplicationProtocolNegotiator"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=io.netty.handler.ssl.JdkNpnSslEngine"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=io.netty.handler.ssl.JdkAlpnSslEngine"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=io.netty.util.internal.JavassistTypeParameterMatcherGenerator"
SVM_OPT
=
"
${
SVM_OPT
}
--delay-class-initialization-to-runtime=com.alibaba.fastjson.serializer.JodaCodec"
# testing
#SVM_OPT="${SVM_OPT} --delay-class-initialization-to-runtime=io.netty.handler.ssl.util.SelfSignedCertificate"
#SVM_OPT="${SVM_OPT} --delay-class-initialization-to-runtime=io.netty.handler.ssl.util.ThreadLocalInsecureRandom"
SVM_OPT
=
"
${
SVM_OPT
}
--rerun-class-initialization-at-runtime=io.netty.handler.ssl.util.SelfSignedCertificate"
SVM_OPT
=
"
${
SVM_OPT
}
--rerun-class-initialization-at-runtime=io.netty.handler.ssl.util.ThreadLocalInsecureRandom"
SVM_OPT
=
"
${
SVM_OPT
}
--enable-url-protocols=http"
SVM_OPT
=
"
${
SVM_OPT
}
--rerun-class-initialization-at-runtime=com.alibaba.fastjson.serializer.SerializeConfig"
SVM_OPT
=
"
${
SVM_OPT
}
--rerun-class-initialization-at-runtime=com.alibaba.fastjson.parser.ParserConfig"
SVM_OPT
=
"
${
SVM_OPT
}
--enable-url-protocols=http"
WORKDIR
=
`
pwd
`
CONFIG_OPT
=
" -Dio.netty.noUnsafe=true -H:+ReportExceptionStackTraces --allow-incomplete-classpath"
#native_image=/home/cengfeng.lzy/GraalDev/graal/vm/mxbuild/linux-amd64/GRAALVM_LIBGRAAL/graalvm-libgraal-1.0.0-rc15
-dev/bin/native-image
native_image
=
~/tools/graalvm-ce-1.0.0-rc14/bin/native-image
$native_image
$CONFIG_OPT
$SVM_OPT
-jar
target/rocketmq-client-4.4
.1-SNAPSHOT-jar-with-dependencies.jar
CONFIG_OPT
=
"
-H:ConfigurationFileDirectories=
${
WORKDIR
}
/config
-Dio.netty.noUnsafe=true -H:+ReportExceptionStackTraces --allow-incomplete-classpath"
native_image
=
/home/cengfeng.lzy/GraalDev/graal/vm/mxbuild/linux-amd64/GRAALVM_LIBGRAAL/graalvm-libgraal-1.0.0-rc16
-dev/bin/native-image
#
native_image=~/tools/graalvm-ce-1.0.0-rc14/bin/native-image
$native_image
$CONFIG_OPT
$SVM_OPT
-jar
target/rocketmq-client-4.5
.1-SNAPSHOT-jar-with-dependencies.jar
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录