listeneropts

package
v0.0.2-test Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagementOption

type ManagementOption func(l common.Listener) error

ManagementOption provides structure for configuring a new Listener

func WithConnectionString

func WithConnectionString(connStr string) ManagementOption

WithConnectionString configures a listener with the information provided in a Service Bus connection string

func WithDetails

func WithDetails(lock time.Duration, maxDelivery int32) ManagementOption

WithDetails allows listeners to control Queue details for longer lived operations. If you using RetryLater you probably want this. Passing zeros leaves it up to Service bus defaults

func WithEnvironmentName

func WithEnvironmentName(environmentName string) ManagementOption

WithEnvironmentName configures the azure environment used to connect to Servicebus. The environment value used is then provided by Azure/go-autorest. ref: https://github.com/Azure/go-autorest/blob/c7f947c0610de1bc279f76e6d453353f95cd1bfa/autorest/azure/environments.go#L34

func WithLockDuration

func WithLockDuration(lock time.Duration) ManagementOption

WithLockDuration allows listeners to control LockDuration. Passing zeros leaves it up to Service bus defaults

func WithManagedIdentityClientID

func WithManagedIdentityClientID(serviceBusNamespaceName, managedIdentityClientID string) ManagementOption

WithManagedIdentityClientID configures a listener with the attached managed identity and the Service bus resource name

func WithManagedIdentityResourceID

func WithManagedIdentityResourceID(serviceBusNamespaceName, managedIdentityResourceID string) ManagementOption

WithManagedIdentityResourceID configures a listener with the attached managed identity and the Service bus resource name

func WithMaxDeliveryCount

func WithMaxDeliveryCount(maxDelivery int32) ManagementOption

WithQueueMaxDeliveryCount allows listeners to control MaxDeliveryCount. Passing zeros leaves it up to Service bus defaults

func WithToken

func WithToken(serviceBusNamespaceName string, spt *adal.ServicePrincipalToken) ManagementOption

WithToken configures a listener with a AAD token

type Option

type Option func(l common.Listener) error

Option provides structure for configuring when starting to listen to a specified topic

func WithMaxConcurrency

func WithMaxConcurrency(concurrency int) Option

func WithMessageLockAutoRenewal

func WithMessageLockAutoRenewal(interval time.Duration) Option

func WithPrefetchCount

func WithPrefetchCount(prefetch uint32) Option

WithPrefetchCount the receiver to quietly acquires more messages, up to the PrefetchCount limit. A single Receive call to the ServiceBus api therefore acquires several messages for immediate consumption that is returned as soon as available. Please be aware of the consequences : https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-prefetch#if-it-is-faster-why-is-prefetch-not-the-default-option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL