Closed istrau2 closed 3 years ago
You have verified the exchange, queue, and queue binding exists?
Also try without mandatory or priority.
@houseofcat Thanks for the response.
Yes, exchange, queue and binding exists, in fact, they were created by the Topologer using the code in the OP.
I tried setting mandatory to false
and priority to 1
to no avail. A couple more points to maybe help solve this:
tcr.NewConnectionPool(cfg.Seasoning.PoolConfig)
takes somewhere between 5-10 seconds to return, the length of time surprised me.amqps://
url without providing certificates via the TCLConfig
I am unsure as to how to debug this. I keep playing with various settings and checking the rabbitmq manager to see if any messages went through but there never are. I always get the same error back in the publish receipt as well.
5671 is the port for amqps, not 5672. Assuming your CloudAmqp is hooked up just fine and amqps is enabled, it could be something else.
You might not be forming a connection. https://www.cloudamqp.com/docs/amqp.html
Also since you are publishing remotely, you should allow a healthy timeout. 10ms is probably too short for long distance remote amqp servers.
@houseofcat I think it is connecting alright because i don't get any errors from the connection pool and because the topologer was able to connect exchanges/queues/bindings.
In terms of the timeout, I tried changing:
PublisherConfig:
PublishTimeOutInterval: 5000
but still got the same message (with 10ms:
letter 40d1e192-2ab1-11ec-9b10-acde48001122 errored on publish with: publish confirmation for LetterID: 40d1e192-2ab1-11ec-9b10-acde48001122 wasn't received in a timely manner (10ms) - recommend retry/requeue
I had assumed that the unit was seconds in PublishTimeOutInterval
. Come to think of it, I had it set to 5 before and it still responded with an error mentioning 10ms. Thoughts?
Sounds like its not reading the value, and I haven't tested anything you have done with Yaml based configuration. I would verify you are editing the write Config and not accidentally loading JSON etc.
You should step through your code when it calls publish to verify the time out value and where its getting assigned. You have custom code sitting on top of your publish and I can confirm publish timeout the unit test is working as expected.
And based on your code, you are calling it with a value of 10.
publisher.PublishWithConfirmationTransient(letter, 10)
While publishTimeOutDuration
is used on PublishWithConfirmation as well, a lot of feedback was that occasionally, the developer would like to dynamically set the timeout based on specific considerations so I added this as an override. You have a global timeout and you have a local timeout override.
I maintain that RTT for CloudAmqp should be greater than 10
ms. An ICMP ping from middle Florida averages 19-25 ms. I would hazard a guess an actual RabbitMQ payload would be slower. Our library would never succeed with a value of 10
set.
@houseofcat Thanks for the responses.
I've fixed the timeout. Unfortunately, still seeing the error:
letter c7012262-2b26-11ec-ab3f-acde48001122 errored on publish with: publish confirmation for LetterID: c7012262-2b26-11ec-ab3f-acde48001122 wasn't received in a timely manner (1000ms) - recommend retry/requeue
@houseofcat please see #25, that has fixed the timeout issue.
Now, I am seeing an error here: https://github.com/houseofcat/turbocookedrabbit/blob/master/v2/pkg/tcr/publisher.go#L297
channel/connection is not open
why would the channel not be open? what is the best way to debug?
Thanks again
After looking through the logs I found:
operation basic.publish caused a connection exception not_implemented: "immediate=true" which led me to this thread: https://github.com/streadway/amqp/issues/45
and after setting immediate flag in the letter to false
, the publish works.
config:
code:
seeing the following error message: