moleculerjs / moleculer

:rocket: Progressive microservices framework for Node.js
https://moleculer.services/
MIT License
6.16k stars 587 forks source link

AMQP 1.0 #561

Closed nllahat closed 4 years ago

nllahat commented 5 years ago

Hi guys,

Currently we're using Moleculer.js with ActiveMQ (AWS service) as our MQTT transporter. We cannot use the AMQP transporter because AWS ActiveMQ is using the newer version of AMQP (1.0). We prefer using the AMQP protocol (along with the broker option disableBalancer: true) cause we want our messages to be queued to increase persistency.

We can't switch to other MQ servers (like RabbitMQ) cause we want the AWS support for this service.

So we thought maybe we should add another transporter AMQP1.0.

What do you think? We will be happy to hear some insights.

@Nathan-Schwartz @icebob

Thanks (:

icebob commented 5 years ago

Hi @nllahat,

it would be good. By the way, it means, the AMQP 1.0 is not compatible with previous versions?

Nathan-Schwartz commented 5 years ago

We use amqp.node for the AMQP transporter and it unfortunately only supports 0-9-1.

It has been discussed for the project here: https://github.com/squaremo/amqp.node/issues/63 https://github.com/squaremo/amqp.node/issues/486

nllahat commented 5 years ago

Hi @nllahat,

it would be good. By the way, it means, the AMQP 1.0 is not compatible with previous versions?

@icebob That's right. Because of that we want to add another transporter and not replacing the existing.

nllahat commented 5 years ago

We use amqp.node for the AMQP transporter and it unfortunately only supports 0-9-1.

It has been discussed for the project here: squaremo/amqp.node#63 squaremo/amqp.node#486

@Nathan-Schwartz Thanks for the references. I want to add another transporter that uses rhea.

icebob commented 5 years ago

Thanks. In this case, another transporter would be good, @nllahat

icebob commented 5 years ago

Any updates about it?

nllahat commented 5 years ago

No.. We postpone this task for now..

On Mon, Sep 30, 2019 at 11:37 PM Icebob notifications@github.com wrote:

Any updated about it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/moleculerjs/moleculer/issues/561?email_source=notifications&email_token=ACF4O3QSVXKIIQCI3EQA7YDQMJPQVA5CNFSM4H42KFJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD77AJCY#issuecomment-536741003, or mute the thread https://github.com/notifications/unsubscribe-auth/ACF4O3QO5GWUP2JU27FUG7LQMJPQVANCNFSM4H42KFJQ .

lehno commented 5 years ago

If you decide to move on with this, let me know as it would be good for us as well

nllahat commented 4 years ago

Hi @lehno we are considering it again. Will update here when we start writing the transporter

tonychangcheng commented 4 years ago

So what is the solution for connecting ActivMQ? Using the experimental AMQP10 or waiting for a new rhea transporter?

bmarchbank commented 4 years ago

@nllahat were you ever able to get this working in AWS MQ? We are running into issues using the AMQP10 transporter to connect on the SSL port (5671).

nllahat commented 4 years ago

We got this working with AWS ActiveMQ. @xvld Do you remember if we had any issues with the SSL port ?

xvld commented 4 years ago

We got this working with AWS ActiveMQ. @xvld Do you remember if we had any issues with the SSL port ?

@nllahat I don't remember any issues there

bmarchbank commented 4 years ago

@nllahat @xvld - Thanks for the response. Good to know it's possible at least... We'll keep looking into it, it may just be a networking issue in our VPC. Rhea-promise is only returning a "Failed to connect" error with not much extra information.

bmarchbank commented 4 years ago

@nllahat @xvld - Thanks for the response. Good to know it's possible at least... We'll keep looking into it, it may just be a networking issue in our VPC. Rhea-promise is only returning a "Failed to connect" error with not much extra information.

FYI in case anyone else encounters this issue... I had to provide a "transport" connection option to rhea in the moleculer.config.ts to get this working:

  transporter: {
    type: "AMQP10",
    options: {
      url: "amqp+ssl://username:password@aws-mq-host:5671",
      connectionOptions: {
        transport: "tls", // required to talk to AWS MQ
      },
    },
  },

I was not able to find a way to do this via the TRANSPORT environment variable's string format.