Skip to content

Support using a custom NATS Streaming channel and queue group. #1399

@bmcustodio

Description

@bmcustodio

My actions before raising this issue

Expected Behaviour

OpenFaaS should allow for customising the NATS Streaming channel and queue group used for asynchronous invocations instead of using the hardcoded faas-request channel and faas queue group. This would allow, for example, to have different deployments of OpenFaaS (in the same or in separate Kubernetes clusters) being serviced by the same NATS Streaming cluster.

Current Behaviour

OpenFaaS and the NATS queue worker use the hardcoded faas-request channel and faas queue group.

Possible Solution

Allow for overriding the name of the channel via a faas_nats_topic environment variable.

Steps to Reproduce (for bugs)

  1. N/A
  2. N/A
  3. N/A
  4. N/A

Context

We will be using a single NATS Streaming cluster to service three different OpenFaaS deployments (across three different Kubernetes clusters), and we need to make sure that invocations of functions in cluster K1 do not end up being processed by queue workers in cluster K2 or K3.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):

N/A

  • Docker version docker version (e.g. Docker 17.0.05 ):

N/A

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?

Kubernetes

  • Operating System and version (e.g. Linux, Windows, MacOS):

N/A

  • Code example or link to GitHub repo or gist to reproduce problem:

N/A

N/A

Next steps

You may join Slack for community support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions