diff --git a/stdbus/bus.go b/stdbus/bus.go index 5583c81..725a2c3 100644 --- a/stdbus/bus.go +++ b/stdbus/bus.go @@ -2,6 +2,8 @@ package stdbus import ( "sync" + "os" + "strconv" "github.com/CyCoreSystems/ari/v6" ) @@ -27,6 +29,13 @@ func New() ari.Bus { subs: []*subscription{}, } + if size := os.Getenv("BUS_BUFFERSIZE"); size != "" { + sizeInt, err := strconv.Atoi(size) + if err == nil && sizeInt > 0 { + subscriptionEventBufferSize = sizeInt + } + } + return b }