SpinGo / op-rabbit

The Opinionated RabbitMQ Library for Scala and Akka
Other
232 stars 73 forks source link

I can read from this RabbitMQ, but not using op-rabbit #174

Open accu-knauthg opened 5 years ago

accu-knauthg commented 5 years ago

If I use traditional newmotion DefaultConsumer(channel), handleDelivery ... I can read from a remote RabbitMQ, but when I try using op-rabbit, I just can't get it to work.

[INFO] [foo-akka.actor.default-dispatcher-7] [akka://foo/user/$a/connection] akka://foo/user/$a/connection connected to amqp://anonymous@{dd.weather.gc.ca:5671}:5671//
[INFO] [foo-op-rabbit.default-channel-dispatcher-6] [akka://foo/user/$a/connection/$a] akka://foo/user/$a/connection/$a connected
[INFO] [foo-akka.actor.default-dispatcher-4] [akka://foo/user/$a/connection/confirmed-publisher-channel] akka://foo/user/$a/connection/confirmed-publisher-channel connected
[INFO] [foo-akka.actor.default-dispatcher-4] [akka://foo/user/$a/connection/$b] akka://foo/user/$a/connection/$b connected
[ERROR] [foo-akka.actor.default-dispatcher-3] [akka://foo/user/$a/subscription-q_anonymous_gsk-1] Connection related error while trying to re-bind a consumer to q_anonymous_gsk. Waiting in anticipating of a new channel.
...
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=403, reply-text=ACCESS_REFUSED - access to exchange 'xpublic' in vhost '/' refused for user 'anonymous', class-id=40, method-id=10)

These are the parameters that work fine with newmotion, but not with op-rabbit.

canada {
  hosts = ["dd.weather.gc.ca"]
  username = "anonymous"
  password = "anonymous"
  port = 5671
  exchange = "xpublic"
  queue = "q_anonymous_gsk"
  routingKey = "v02.post.observations.swob-ml.#"
  requestedHeartbeat = 300
  ssl = true
}

If someone can read from this RabbitMQ using op-rabbit, I'd be very interested to know how you did it, because I've been beating myself up for days trying to get the op-rabbit version to work.

accu-knauthg commented 5 years ago

Here's an example of how another person successfully connects to this service using node: https://github.com/darkskyapp/node-sarra

And here is documentation from Environment Canada: http://dd.weather.gc.ca/doc/README_AMQP.txt

Detail and diagrams here: https://github.com/MetPX/sarracenia/blob/master/doc/sarra.rst

"Dumbed-down" Python3 client that "fixes all AMQPS issues": https://github.com/JohnTheNerd/PySarra/blob/master/consumers/ECConsumer.py

accu-knauthg commented 5 years ago

I wonder if the problems I'm having are related to https://github.com/SpinGo/op-rabbit/issues/167

accu-knauthg commented 5 years ago

Is it possible to hire someone who is expert at op-rabbit? I haven't received any reply to this issue.

accu-knauthg commented 5 years ago

I posted a related question on Stack Overflow, hoping someone there might have a comment. https://stackoverflow.com/questions/57371143/why-do-i-get-access-refused-using-op-rabbit-but-not-newmotion-akka