代码拉取完成,页面将自动刷新
This is a minimalistic Kotlin port of the RabbitMQ tutorials in Java. The port is admittedly quite close to Java in terms of code style.
gradle clean compileKotlin
Execute the following command to start a Hello, world consumer
gradle run -P main=Recv
Execute the following in a separate shell to publish a Hello, world messge:
gradle run -P main=Send
Send a task message. The task will be completed immediately
gradle run -P main=NewTask
To start a worker (run in a separate shell):
gradle run -P main=Worker
Send a task message. It will wait for 1 second for each dot in the payload.
gradle run -P main=NewTask -P argv="rabbit1 ...."
Add more workers to the same queue, message will be distributed in the round robin manner.
gradle run -P main=ReceiveLogs
gradle run -P main=EmitLog -P argv="rabbit1, msg1"
gradle run -P main="ReceiveLogsDirect" -P argv="info,error"
gradle run -P main=EmitLogDirect"
gradle run -P main=ReceiveLogsTopic -P argv="anonymous.*"
gradle run -P main=EmitLogTopic -P argv="anonymous.info"
In one shell:
gradle run -P main=RPCServer
In another shell:
gradle run -P main=RPCClient
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。