nats.cr:NATS的水晶客户端 源码
NATS-水晶客户端 适用于编程语言的简单NATS客户端。 安装 将依赖项添加到您的shard.yml : dependencies : nats : github : nats-io/nats.cr 运行分shards install 用法 require " nats " nc = NATS :: Connection .new( " demo.nats.io " ) nc.subscribe( " foo " ) { | msg | puts " Received ' #{ msg } ' " } nc.publish( " foo " , " Hello! " ) sub = nc.subscribe( " req " ) do | msg | msg.respond( " ANSWER is 42 " ) end answer = nc.req
用户评论