command
Version:
v0.0.0-...-908d554
Opens a new window with list of versions in this module.
Published: Nov 2, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Broker
Micro中的broker用于代理消息的发布与订阅。
内容
- main.go - main程序运行两个协程20秒钟,各自负责发布与订阅消息。
运行程序
如果使用默认的http broker,请运行:
go run main.go
如果想使用其他消息队列服务,例如nats,请运行:
export MICRO_BROKER=nats
go run main.go
或者:
go run main.go --broker=nats
或者:
go run main.go --broker=nats --broker_address=127.0.0.1:4222
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.