openfaas / nats-queue-worker

Queue-worker for OpenFaaS with NATS Streaming
https://docs.openfaas.com/reference/async/
MIT License
128 stars 59 forks source link

Nats cluster has fixed cluster ID "faas-cluster" #70

Closed samhuss closed 4 years ago

samhuss commented 4 years ago

Hello,

I'm trying OpenFaas for my new project using Nomad with Consul by following Nick Jackson's documentation for faas-nomad provider. While I'm having my environment already setup with Nats and Nats-Streaming clusters using the default cluster id "test-cluster" there was no way that the OpenFaas gateway would pick it up. I figured out the issue was a hard coded cluster ID in the source code for the problem.

I renamed my cluster ID with "faas-cluster" and all worked fine. But to keep my own setup intact I had to create separate nats streaming cluster only for OpenFaas.

It would be nice if there is a way to pass the cluster id in the gateway args rather than creating a dedicated cluster.

Current Behaviour

Nats cluster must have an id of "faas-cluster"

Possible Solution

Pass an optional argument faas_nats_id to the gateway arguments

alexellis commented 4 years ago

Moving issue to correct repo.

Thanks for the suggestion, let's gauge interest to see if it's something we want to be configurable or not.

bmcustodio commented 4 years ago

I'd be interested in this as well.

bmcustodio commented 4 years ago

@alexellis this can be closed now