SimpleAMQPClient "a socket error occurred"

281 views
Skip to first unread message

Surya Mukherjee

unread,
Nov 2, 2020, 12:51:43 AM11/2/20
to rabbitmq-users
Hi,
I have downloaded SimpleAmqpClient (ver 2.4.0) NuGet package in my c++ project. I want to publish messages to the queue. When I am trying to create a channel using following code I am getting "AmqpClient::AmqpResponseLibraryException". When checked the exception message its showing ": a socket error occurred".
There is no issue connecting to the same server using RabbitMQ.Client in C#.

Here is my code snippet.
       
        try
{
AmqpClient::Channel::ptr_t channel = AmqpClient::Channel::Create("localhost", 5672, "test", "test");
}
catch (std::exception ex)
        { } 

This is what i get in broker log:

2020-11-02 11:20:19.970 [info] <0.26090.7> accepting AMQP connection <0.26090.7> ([::1]:24569 -> [::1]:5672)
2020-11-02 11:20:22.978 [error] <0.26090.7> closing AMQP connection <0.26090.7> ([::1]:24569 -> [::1]:5672):
failed to negotiate connection parameters: negotiated channel_max = 0 (no limit) is higher than the maximum allowed value (2047)

Please let me know where I am going wrong. Thanks in advance.

Wesley Peng

unread,
Nov 2, 2020, 3:06:05 AM11/2/20
to rabbitm...@googlegroups.com
On 2020/11/2 1:51 下午, Surya Mukherjee wrote:
> failed to negotiate connection parameters: negotiated channel_max = 0
> (no limit) is higher than the maximum allowed value (2047)


It seems like the max limitation for channel number should be set to 2048.

https://github.com/omniti-labs/pg_amqp/issues/23

regards.

Surya Mukherjee

unread,
Nov 2, 2020, 3:10:25 AM11/2/20
to rabbitm...@googlegroups.com
Hi, 

I am able to resolve this issue by setting channel_max to 0 in rabbitmq config file.
Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/wECB9y0gswc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/9a73e662-aa53-a4b0-4e16-bf4f115ce06f%40tls-mail.com.
Reply all
Reply to author
Forward
0 new messages