Rabbitmq Stream Go Client Can not connect

126 views
Skip to first unread message

lucas zhang

unread,
Jul 29, 2024, 3:05:55 AM7/29/24
to rabbitmq-users
I use golang to test rabbitmq stream queue, but I receive error on connect.

The error is :
2024/07/29 14:10:55 [error] - timeout 10000 ns - waiting Code, operation: Command not handled 27
2024/07/29 14:10:55 [error] - New environment creation. Can't connect to the broker: localhost port: 5552.

I  don't know how to solve it, I use docker to run rabbitmq server

docker run -it --rm --name rabbitmq -p 5552:5552 -p 15672:15672 -p 5672:5672 \
-e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS='-rabbitmq_stream advertised_host localhost' \
rabbitmq:3.9-management

And my go code is:
env, err := stream.NewEnvironment(
        stream.NewEnvironmentOptions().
            SetHost("localhost").SetPort(5552).SetUser("guest").SetPassword("guest"))
    if err != nil {
        panic(err)
    }


Who can help me? I am so dispirited

Vilius Šumskas

unread,
Jul 29, 2024, 4:48:48 AM7/29/24
to rabbitm...@googlegroups.com

Did you actually changed the port in RabbitMQ configuration?

 

--

    Vilius

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/7819e4f9-32c9-4526-af0a-15a42e2efdd6n%40googlegroups.com.

Vilius Šumskas

unread,
Jul 29, 2024, 4:52:56 AM7/29/24
to rabbitm...@googlegroups.com

I ment did you actually activated Stream Plugin on that port? This will shed some light  https://www.rabbitmq.com/docs/stream-core-plugin-comparison

 

--

    Vilius

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

lucas zhang

unread,
Jul 29, 2024, 8:23:26 AM7/29/24
to rabbitmq-users
I had do it 

I had try to use rabbitmq-stream-go-client v1.3.0, It is ok

But I can not connect to remote rabbitmq server , I don't know why? Is about the env 'advertised_host'?

lucas zhang

unread,
Jul 29, 2024, 8:23:56 AM7/29/24
to rabbitmq-users
Why my reply is deleted? 

Get down to business, I use  rabbitmq-stream-go-client v1.3.0, it is ok!

But I can't connect to remote rabbitmq server, I wonder if it is about the env 'advertised_host'? 
I set  RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS='-rabbitmq_stream advertised_host localhost -rabbit loopback_users "none"'

在2024年7月29日星期一 UTC+8 16:52:56<Vilius Šumskas> 写道:

Arnaud Cogoluègnes

unread,
Jul 29, 2024, 8:28:15 AM7/29/24
to rabbitmq-users
Yes, the Docker command above is for local development, it won't work if the client application and the broker are not on the same host.

You can read a blog post [1] about the connection mechanism for streams.

You should also use the latest version of RabbitMQ (3.13 at this time).

Gabriele Santomaggio

unread,
Jul 29, 2024, 8:42:31 AM7/29/24
to rabbitmq-users

lucas zhang

unread,
Jul 29, 2024, 11:35:55 PM7/29/24
to rabbitmq-users
I can not change the rabbitmq version.

Now I connect to remote rabbitmq server and publish message to stream, but the stream queue is zero.

I don't know the  advertised_host  how to set 

My Rabbitmq version is 3.9.16.

Reply all
Reply to author
Forward
0 new messages