feat: AMQP bridge not connecting
Closed this issue · 6 comments
Hello, I am trying to use the AMQP event bridge, I implemented it like this:
But when I try to run purista, I get this error every time:
It seems, that even though I change the url of the AMQP server, purista still tries to connect to localhost. I have also tried the example provided in the docs, it makes typescript not compile because of Argument of type '{ config: AmqpBridgeConfig; }' is not assignable to parameter of type '{ logger?: Logger | undefined; logLevel?: LogLevelName | undefined; spanProcessor?: SpanProcessor | undefined; instanceId?: string | undefined; ... 7 more ...; encrypter?: Encrypter | undefined; }'
Hi @vyPal ,
how does the URL look? Something similar to amqp://localhost
?
In the screenshot, it looks kind of wrong with ...@dog.lmq.coudamqp.com/...
In the docs, it is outdated because the config has become more flat.
It must be:
const config:AmqpBridgeConfig = {
url: 'amqp://my-amqp-host.example.com'
}
const eventBridge = new AmqpBridge( config )
instead of
const eventBridge = new AmqpBridge( { config })
The URL starts with amqps://
, then there is some login info and then the @dog.lmq.coudamqp.com/
part. I have tried the updated config that you have sent, same error, and I have tried using the URL with just amqp://
instead of amqps://
, also no difference
can you try without trailing slash? @dog.lmq.coudamqp.com
and not @dog.lmq.coudamqp.com/
?
I released version 1.7.2 a few secs before.
There was an issue in the implementation, where the defaults are overwriting the user config in AMQP bridge.
This should be fixed, and the documentation also got some fixes regarding the config.
Might be, you can try out the new version and let me know if it works.
Thanks for trying out PURISTA btw
Yes, everything works now, thanks for fixing it, and I must say that at least so far, I do like purista, especially the openapi integration. I will now close this issue. Once again, thanks for the help.