【发布时间】:2019-08-23 19:05:33
【问题描述】:
我是新的 NATS。 我只是尝试使用 NATS-streaming-server 示例发送和接收文本文件。
当我发送一个文本文件(~9B)时,它可以工作
-酒吧 作为客户端“cs-publisher”连接到集群“test-cluster”。 在主题 foo 上发布 1 条消息 网址:nats://localhost:4222 有效载荷为 9 个字节。 在 0.0076917 秒(130 条消息/秒)内发布了 1 条带有确认的消息。
-子 作为客户端“cs-subscriber”连接到集群“test-cluster”。 收到关于主题 foo 的 1 条消息 网址:nats://localhost:4222 在 6E-07 秒内收到 1 条消息(1666666 条消息/秒)。
但是,当我发送一个文本文件(~80MB)时,订阅不起作用。
-酒吧 作为客户端“cs-publisher”连接到集群“test-cluster”。 在主题 foo 上发布 1 条消息 网址:nats://localhost:4222 有效载荷为 77552640 字节。 在 1.2574163 秒内发布了 1 条带有确认的消息(0 条消息/秒)。
-子 作为客户端“cs-subscriber”连接到集群“test-cluster”。 收到关于主题 foo 的 1 条消息 网址:nats://loaclhost:4222
我不知道为什么订阅没有反应。我使用了相同的代码,只是更改了我发送的文件。
byte[] payload = File.ReadAllBytes("test.txt");
....
string guid = c.Publish(subject, payload, (obj, pubArgs) =>
请帮帮我
【问题讨论】:
标签: nats.io nats-streaming-server