Updates for NATS Streaming support

NATS Streaming is deprecated and will be removed from OpenFaaS
CE in a future release for security reasons.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2023-01-17 21:55:48 +00:00
parent 8e1c34e222
commit c26ec5221e
188 changed files with 22639 additions and 3717 deletions

View File

@ -6,7 +6,10 @@ import (
"sync"
)
// CreateNATSQueue ready for asynchronous processing
const sharedQueue = "faas-request"
// CreateNATSQueue ready for asynchronous message processing of paylods of
// up to a maximum of 256KB in size.
func CreateNATSQueue(address string, port int, clusterName, channel string, clientConfig NATSConfig) (*NATSQueue, error) {
var err error
natsURL := fmt.Sprintf("nats://%s:%d", address, port)
@ -16,7 +19,7 @@ func CreateNATSQueue(address string, port int, clusterName, channel string, clie
// If 'channel' is empty, use the previous default.
if channel == "" {
channel = "faas-request"
channel = sharedQueue
}
queue1 := NATSQueue{