Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netcore 3.1 publishasync failed #100

Open
LukeWJ opened this issue Aug 4, 2020 · 0 comments
Open

netcore 3.1 publishasync failed #100

LukeWJ opened this issue Aug 4, 2020 · 0 comments

Comments

@LukeWJ
Copy link

LukeWJ commented Aug 4, 2020

I am trying to publish message to nsq

My Code:
var producer = new Producer("xxx:9011", new ConsoleLogger(LogLevel.Debug));
producer.PublishAsync("DotNetCore", "test");

Centos
CentOS Linux release 7.2.1511 (Core)

NSQ
nsqd v1.0.0-compat (built w/go1.8) (depovement at CentOS Linux release 7.2.1511)

dotnet core
3.1.302

NsqSharp.Core
https://github.com/tonyredondo/NsqSharp

ERROR Logs:
[INF] P1 xxxx:9011 connecting to nsqd
[DBG] P1 (xxxx:9011) frameType: 791752241,data length:1213486156 (add debug message by myself)
[ERR] P1 (xxxx:9011) error connecting to nsqd - failed to IDENTIFY - Exception of type 'System.OutOfMemoryException' was thrown.
at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
at System.Text.UTF8Encoding.GetString(Byte[] bytes, Int32 index, Int32 count)
at System.Text.Encoding.GetString(Byte[] bytes)
at NsqSharp.Core.Conn.identify() in E:\Demo\Git\NsqSharp\NsqSharp\Core\Conn.cs:line 415

PS:
When I testing same code and connecting nsqd (depovement at CentOS release 6.10 (Final)), it works.

Logs:
[INF] P1 xxxx:9032 connecting to nsqd
[DBG] P1 (xxxx:9032) frameType: Response,data length:271
[DBG] P1 (xxxx:9032) IDENTIFY response: {"max_rdy_count":2500,"version":"1.0.0-compat","max_msg_timeout":900000,"msg_timeout":60000,"tls_v1":false,"deflate":false,"deflate_level":0,"max_deflate_level":6,"snappy":false,"sample_rate":0,"auth_required":false,"output_buffer_size":16384,"output_buffer_timeout":250}
[INF] P1 xxxx:9032 connected to nsqd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant