Open laibulle opened 6 years ago
FYI, I did not created the topic. So I found this log entry in
{'v1_0.error',{symbol,<<"amqp:invalid-field">>},{utf8,<<"Attach rejected: {unknown_destination,\"/queue-name\"}">>},undefined}
but the driver did not returned any error.
Thanks for the report!
The existing logic wasn't propagating session errors during the attachment. I've opened #61 to resolve this.
I confirmed this propagates the error. I was able to create a "queue-name" in RabbitMQ and attach using "/topic/queue-name" as the target address. It did hang when closing the sender due to the way RabbitMQ responds to the detach. I'll need to look into this a bit more to see if it's something that needs to be corrected in this library but don't have time at the moment. I hope to get to it soon though.
@laibulle The necessary fixes for this library to work with RabbitMQ have been completed. Closing a link will hang until https://github.com/rabbitmq/rabbitmq-amqp1.0/issues/60 is resolved, but it can be worked around by applying a timeout to the close via the context argument of Sender.Close
or simply closing the client connection.
Please let me know if you run into any other problems. I'll leave this issue open at least until the RabbitMQ issue has been resolved.
@vcabbage this is still don't work. (Rabbit 3.7.7)
Getting <nil> unexpected frame: &amqp.performClose{Error:(*amqp.Error)(0xc4202c41e0)}
on create NewSession()
Test looks like:
// Connect to RabbitMQ
amqpConnection, err = amqp.Dial(config.Mq.Rabbit.URL, amqp.ConnMaxFrameSize(5000))
if err != nil {
err = errors.Wrap(err, "Rabbit initialization failed")
return
}
fmt.Println(amqpConnection.NewSession())
Can you help?
@Nyarum I tried to reproduce the issue with a RabbitMQ docker container with the AMQP 1.0 plugin enabled. I didn't get an error on NewSession()
.
Dockerfile:
FROM rabbitmq:3.7-management
RUN rabbitmq-plugins enable --offline rabbitmq_amqp1_0
Commands:
docker build -t rabbitmq-amqp10 .
docker run --rm -p 8080:15672 -p 5672:5672 rabbitmq-amqp10
If you modify: https://github.com/vcabbage/amqp/blob/271d6282f59cd10184fef147de589cce8ad69c93/conn.go#L376
in your local copy of the lib to be:
c.err = errorErrorf("unexpected frame: %v", fr.body)
It should print out the error information rather than the pointer, which may help track down the issue.
Hello,
I try to get this package work with RabbitMQ and the AMQP 1 plugin. I can get it work with Go and Azure or C# and RabbitMQ but not with Go and RabbitMQ. Here is my code
The code is blocked at
session.NewSender
and moreover I can't see the connection in RabbitMQ admin.Did I miss something ?
Best regard