README

Microsoft Azure Service Bus Client for Golang

Go Report Card godoc Build Status Coverage Status

Microsoft Azure Service Bus is a reliable cloud messaging service (MaaS) which simplifies enterprise cloud messaging. It enables developers to build scalable cloud solutions and implement complex messaging workflows over an efficient binary protocol called AMQP.

This library provides a simple interface for sending, receiving and managing Service Bus entities such as Queues, Topics and Subscriptions.

For more information about Service Bus, check out the Azure documentation.

This library is a pure Golang implementation of Azure Service Bus over AMQP.

Preview of Service Bus for Golang

This library is currently a preview. There may be breaking interface changes until it reaches semantic version v1.0.0. If you run into an issue, please don't hesitate to log a new issue or open a pull request.

Install using Go modules

go get -u github.com/Azure/azure-service-bus-go

If you need to install Go, follow the official instructions

Examples

Find up-to-date examples and documentation on godoc.org.

Running tests

Most tests require a properly configured service bus in Azure. The easiest way to set this up is to use the Terraform deployment script. Running the integration tests will take longer than the default 10 mintues, please use a larger timeout go test -timeout 30m.

Have questions?

The developers of this library are all active on the Gopher Slack, it is likely easiest to get our attention in the Microsoft Channel. We'll also find your issue if you ask on Stack Overflow with the tags azure and go.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Expand ▾ Collapse ▴

Documentation

Overview

Example (AutoForward)
Output:

forward me to target!
Example (BatchingMessages)
Output:

foo 0
foo 1
foo 2
foo 3
foo 4
foo 5
foo 6
foo 7
foo 8
foo 9
Example (DeadletterQueues)
Output:

count: 1
count: 2
count: 3
count: 4
count: 5
count: 6
count: 7
count: 8
count: 9
count: 10
foo
Example (DeferMessages)
Output:

step: 1, Shop
step: 2, Unpack
step: 3, Prepare
step: 4, Cook
step: 5, Eat
Example (DuplicateMessageDetection)
Output:

foo
Example (MessageBrowse)
Output:

Firstname: Albert, Surname: Einstein
Firstname: Werner, Surname: Heisenberg
Firstname: Marie, Surname: Curie
Firstname: Steven, Surname: Hawking
Firstname: Isaac, Surname: Newton
Firstname: Niels, Surname: Bohr
Firstname: Michael, Surname: Faraday
Firstname: Galileo, Surname: Galilei
Firstname: Johannes, Surname: Kepler
Firstname: Nikolaus, Surname: Kopernikus
Example (MessageSessions)
Output:

Begin session:  foo
  Step: 1, Shop
  Step: 2, Unpack
  Step: 3, Prepare
  Step: 4, Cook
  Step: 5, Eat
End session:  foo

Begin session:  bar
  Step: 1, Shop
  Step: 2, Unpack
  Step: 3, Prepare
  Step: 4, Cook
  Step: 5, Eat
End session:  bar

Begin session:  bazz
  Step: 1, Shop
  Step: 2, Unpack
  Step: 3, Prepare
  Step: 4, Cook
  Step: 5, Eat
End session:  bazz

Begin session:  buzz
  Step: 1, Shop
  Step: 2, Unpack
  Step: 3, Prepare
  Step: 4, Cook
  Step: 5, Eat
End session:  buzz
Example (Prefetch)
Output:

prefetch of 1000 took less time!
Example (PrioritySubscriptions)
Output:

Priority1_foo_1
Priority2_bar_2
PriorityGreaterThan2_bazz_3
PriorityGreaterThan2_buzz_4
Example (QueueSendAndReceive)
Output:

Hello, World!!!
Example (ScheduledMessage)
Output:

Received when expected!

Index

Examples

Constants

View Source
const (
	// PeekLockMode causes a Receiver to peek at a message, lock it so no others can consume and have the queue wait for
	// the DispositionAction
	PeekLockMode ReceiveMode = 0
	// ReceiveAndDeleteMode causes a Receiver to pop messages off of the queue without waiting for DispositionAction
	ReceiveAndDeleteMode ReceiveMode = 1

	// DeadLetterQueueName is the name of the dead letter queue to be appended to the entity path
	DeadLetterQueueName = "$DeadLetterQueue"

	// TransferDeadLetterQueueName is the name of the transfer dead letter queue which is appended to the entity name to
	// build the full address of the transfer dead letter queue.
	TransferDeadLetterQueueName = "$Transfer/" + DeadLetterQueueName
)
View Source
const (

	// Version is the semantic version number
	Version = "0.10.11"
)

Variables

This section is empty.

Functions

func IsErrNotFound

func IsErrNotFound(err error) bool

    IsErrNotFound returns true if the error argument is an ErrNotFound type

    Types

    type ActionDescriber

    type ActionDescriber interface {
    	ToActionDescription() ActionDescription
    }

      ActionDescriber can transform itself into a ActionDescription

      type ActionDescription

      type ActionDescription struct {
      	Type                  string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"`
      	SQLExpression         string `xml:"SqlExpression"`
      	RequiresPreprocessing bool   `xml:"RequiresPreprocessing"`
      	CompatibilityLevel    int    `xml:"CompatibilityLevel,omitempty"`
      }

        ActionDescription describes an action upon a message that matches a filter

        With SQL filter conditions, you can define an action that can annotate the message by adding, removing, or replacing properties and their values. The action uses a SQL-like expression that loosely leans on the SQL UPDATE statement syntax. The action is performed on the message after it has been matched and before the message is selected into the subscription. The changes to the message properties are private to the message copied into the subscription.

        type BaseEntityDescription

        type BaseEntityDescription struct {
        	InstanceMetadataSchema *string `xml:"xmlns:i,attr,omitempty"`
        	ServiceBusSchema       *string `xml:"xmlns,attr,omitempty"`
        }

          BaseEntityDescription provides common fields which are part of Queues, Topics and Subscriptions

          type BatchDispositionError

          type BatchDispositionError struct {
          	Errors []DispositionError
          }

            BatchDispositionError is an error which returns a collection of DispositionError.

            func (BatchDispositionError) Error

            func (bde BatchDispositionError) Error() string

            type BatchDispositionIterator

            type BatchDispositionIterator struct {
            	LockTokenIDs []*uuid.UUID
            	Status       MessageStatus
            	// contains filtered or unexported fields
            }

              BatchDispositionIterator provides an iterator over LockTokenIDs

              func (*BatchDispositionIterator) Done

              func (bdi *BatchDispositionIterator) Done() bool

                Done communicates whether there are more messages remaining to be iterated over.

                func (*BatchDispositionIterator) Next

                func (bdi *BatchDispositionIterator) Next() (uuid *uuid.UUID)

                  Next iterates to the next LockToken

                  type BatchIterator

                  type BatchIterator interface {
                  	Done() bool
                  	Next(messageID string, opts *BatchOptions) (*MessageBatch, error)
                  }

                    BatchIterator offers a simple mechanism for batching a list of messages

                    type BatchOptions

                    type BatchOptions struct {
                    	SessionID *string
                    }

                      BatchOptions are optional information to add to a batch of messages

                      type Closer

                      type Closer interface {
                      	Close(ctx context.Context) error
                      }

                        Closer provides the ability to close an entity

                        type CorrelationFilter

                        type CorrelationFilter struct {
                        	CorrelationID    *string                `xml:"CorrelationId,omitempty"`
                        	MessageID        *string                `xml:"MessageId,omitempty"`
                        	To               *string                `xml:"To,omitempty"`
                        	ReplyTo          *string                `xml:"ReplyTo,omitempty"`
                        	Label            *string                `xml:"Label,omitempty"`
                        	SessionID        *string                `xml:"SessionId,omitempty"`
                        	ReplyToSessionID *string                `xml:"ReplyToSessionId,omitempty"`
                        	ContentType      *string                `xml:"ContentType,omitempty"`
                        	Properties       map[string]interface{} `xml:"Properties,omitempty"`
                        }

                          CorrelationFilter holds a set of conditions that are matched against one or more of an arriving message's user and system properties. A common use is to match against the CorrelationId property, but the application can also choose to match against ContentType, Label, MessageId, ReplyTo, ReplyToSessionId, SessionId, To, and any user-defined properties. A match exists when an arriving message's value for a property is equal to the value specified in the correlation filter. For string expressions, the comparison is case-sensitive. When specifying multiple match properties, the filter combines them as a logical AND condition, meaning for the filter to match, all conditions must match.

                          func (CorrelationFilter) ToFilterDescription

                          func (cf CorrelationFilter) ToFilterDescription() FilterDescription

                            ToFilterDescription will transform the CorrelationFilter into a FilterDescription

                            type CountDetails

                            type CountDetails struct {
                            	XMLName                        xml.Name `xml:"CountDetails"`
                            	ActiveMessageCount             *int32   `xml:"ActiveMessageCount,omitempty"`
                            	DeadLetterMessageCount         *int32   `xml:"DeadLetterMessageCount,omitempty"`
                            	ScheduledMessageCount          *int32   `xml:"ScheduledMessageCount,omitempty"`
                            	TransferDeadLetterMessageCount *int32   `xml:"TransferDeadLetterMessageCount,omitempty"`
                            	TransferMessageCount           *int32   `xml:"TransferMessageCount,omitempty"`
                            }

                              CountDetails has current active (and other) messages for queue/topic.

                              type DeadLetter

                              type DeadLetter struct {
                              	// contains filtered or unexported fields
                              }

                                DeadLetter represents a dead letter queue in Azure Service Bus.

                                Azure Service Bus queues, topics and subscriptions provide a secondary sub-queue, called a dead-letter queue (DLQ). The dead-letter queue does not need to be explicitly created and cannot be deleted or otherwise managed independent of the main entity.

                                The purpose of the dead-letter queue is to hold messages that cannot be delivered to any receiver, or messages that could not be processed. Messages can then be removed from the DLQ and inspected. An application might, with help of an operator, correct issues and resubmit the message, log the fact that there was an error, and take corrective action.

                                From an API and protocol perspective, the DLQ is mostly similar to any other queue, except that messages can only be submitted via the dead-letter operation of the parent entity. In addition, time-to-live is not observed, and you can't dead-letter a message from a DLQ. The dead-letter queue fully supports peek-lock delivery and transactional operations.

                                Note that there is no automatic cleanup of the DLQ. Messages remain in the DLQ until you explicitly retrieve them from the DLQ and call Complete() on the dead-letter message.

                                func NewDeadLetter

                                func NewDeadLetter(builder DeadLetterBuilder) *DeadLetter

                                  NewDeadLetter constructs an instance of DeadLetter which represents a dead letter queue in Azure Service Bus

                                  func (*DeadLetter) Close

                                  func (dl *DeadLetter) Close(ctx context.Context) error

                                    Close the underlying connection to Service Bus

                                    func (*DeadLetter) ReceiveOne

                                    func (dl *DeadLetter) ReceiveOne(ctx context.Context, handler Handler) error

                                      ReceiveOne will receive one message from the dead letter queue

                                      type DeadLetterBuilder

                                      type DeadLetterBuilder interface {
                                      	NewDeadLetterReceiver(ctx context.Context, opts ...ReceiverOption) (ReceiveOner, error)
                                      }

                                        DeadLetterBuilder provides the ability to create a new receiver addressed to a given entity's dead letter queue.

                                        type DefaultRuleDescription

                                        type DefaultRuleDescription struct {
                                        	XMLName xml.Name          `xml:"DefaultRuleDescription"`
                                        	Filter  FilterDescription `xml:"Filter"`
                                        	Name    *string           `xml:"Name,omitempty"`
                                        }

                                          DefaultRuleDescription is the content type for Subscription Rule management requests

                                          type DispositionAction

                                          type DispositionAction func(ctx context.Context) error

                                            DispositionAction represents the action to notify Azure Service Bus of the Message's disposition

                                            type DispositionError

                                            type DispositionError struct {
                                            	LockTokenID *uuid.UUID
                                            	// contains filtered or unexported fields
                                            }

                                              DispositionError is an error associated with a LockTokenID.

                                              func (DispositionError) Error

                                              func (de DispositionError) Error() string

                                              func (DispositionError) UnWrap

                                              func (de DispositionError) UnWrap() error

                                                UnWrap will return the private error.

                                                type Entity

                                                type Entity struct {
                                                	Name string
                                                	ID   string
                                                }

                                                  Entity is represents the most basic form of an Azure Service Bus entity.

                                                  func (Entity) TargetURI

                                                  func (e Entity) TargetURI() string

                                                    TargetURI provides an absolute address to a target entity

                                                    type EntityManagementAddresser

                                                    type EntityManagementAddresser interface {
                                                    	ManagementPath() string
                                                    }

                                                      EntityManagementAddresser describes the ability of an entity to provide an addressable path to it's management endpoint

                                                      type EntityStatus

                                                      type EntityStatus string

                                                        EntityStatus enumerates the values for entity status.

                                                        const (
                                                        	// Active ...
                                                        	Active EntityStatus = "Active"
                                                        	// Creating ...
                                                        	Creating EntityStatus = "Creating"
                                                        	// Deleting ...
                                                        	Deleting EntityStatus = "Deleting"
                                                        	// Disabled ...
                                                        	Disabled EntityStatus = "Disabled"
                                                        	// ReceiveDisabled ...
                                                        	ReceiveDisabled EntityStatus = "ReceiveDisabled"
                                                        	// Renaming ...
                                                        	Renaming EntityStatus = "Renaming"
                                                        	// Restoring ...
                                                        	Restoring EntityStatus = "Restoring"
                                                        	// SendDisabled ...
                                                        	SendDisabled EntityStatus = "SendDisabled"
                                                        	// Unknown ...
                                                        	Unknown EntityStatus = "Unknown"
                                                        )

                                                        type ErrAMQP

                                                        type ErrAMQP rpc.Response

                                                          ErrAMQP indicates that the server communicated an AMQP error with a particular

                                                          func (ErrAMQP) Error

                                                          func (e ErrAMQP) Error() string

                                                          type ErrConnectionClosed

                                                          type ErrConnectionClosed string

                                                            ErrConnectionClosed indicates that the connection has been closed.

                                                            func (ErrConnectionClosed) Error

                                                            func (e ErrConnectionClosed) Error() string

                                                            type ErrIncorrectType

                                                            type ErrIncorrectType struct {
                                                            	Key          string
                                                            	ExpectedType reflect.Type
                                                            	ActualValue  interface{}
                                                            }

                                                              ErrIncorrectType indicates that type assertion failed. This should only be encountered when there is an error with this library, or the server has altered its behavior unexpectedly.

                                                              func (ErrIncorrectType) Error

                                                              func (e ErrIncorrectType) Error() string

                                                              type ErrMalformedMessage

                                                              type ErrMalformedMessage string

                                                                ErrMalformedMessage indicates that a message was expected in the form of []byte was not a []byte. This is likely a bug and should be reported.

                                                                func (ErrMalformedMessage) Error

                                                                func (e ErrMalformedMessage) Error() string

                                                                type ErrMissingField

                                                                type ErrMissingField string

                                                                  ErrMissingField indicates that an expected property was missing from an AMQP message. This should only be encountered when there is an error with this library, or the server has altered its behavior unexpectedly.

                                                                  func (ErrMissingField) Error

                                                                  func (e ErrMissingField) Error() string

                                                                  type ErrNoMessages

                                                                  type ErrNoMessages struct{}

                                                                    ErrNoMessages is returned when an operation returned no messages. It is not indicative that there will not be more messages in the future.

                                                                    func (ErrNoMessages) Error

                                                                    func (e ErrNoMessages) Error() string

                                                                    type ErrNotFound

                                                                    type ErrNotFound struct {
                                                                    	EntityPath string
                                                                    }

                                                                      ErrNotFound is returned when an entity is not found (404)

                                                                      func (ErrNotFound) Error

                                                                      func (e ErrNotFound) Error() string

                                                                      type FalseFilter

                                                                      type FalseFilter struct{}

                                                                        FalseFilter represents a always false sql expression which will deny all messages

                                                                        func (FalseFilter) ToFilterDescription

                                                                        func (ff FalseFilter) ToFilterDescription() FilterDescription

                                                                          ToFilterDescription will transform the FalseFilter into a FilterDescription

                                                                          type FilterDescriber

                                                                          type FilterDescriber interface {
                                                                          	ToFilterDescription() FilterDescription
                                                                          }

                                                                            FilterDescriber can transform itself into a FilterDescription

                                                                            type FilterDescription

                                                                            type FilterDescription struct {
                                                                            	XMLName xml.Name `xml:"Filter"`
                                                                            	CorrelationFilter
                                                                            	Type               string  `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"`
                                                                            	SQLExpression      *string `xml:"SqlExpression,omitempty"`
                                                                            	CompatibilityLevel int     `xml:"CompatibilityLevel,omitempty"`
                                                                            }

                                                                              FilterDescription describes a filter which can be applied to a subscription to filter messages from the topic.

                                                                              Subscribers can define which messages they want to receive from a topic. These messages are specified in the form of one or more named subscription rules. Each rule consists of a condition that selects particular messages and an action that annotates the selected message. For each matching rule condition, the subscription produces a copy of the message, which may be differently annotated for each matching rule.

                                                                              Each newly created topic subscription has an initial default subscription rule. If you don't explicitly specify a filter condition for the rule, the applied filter is the true filter that enables all messages to be selected into the subscription. The default rule has no associated annotation action.

                                                                              type Handler

                                                                              type Handler interface {
                                                                              	Handle(context.Context, *Message) error
                                                                              }

                                                                                Handler exposes the functionality required to process a Service Bus message.

                                                                                type HandlerFunc

                                                                                type HandlerFunc func(context.Context, *Message) error

                                                                                  HandlerFunc is a type converter that allows a func to be used as a `Handler`

                                                                                  func (HandlerFunc) Handle

                                                                                  func (hf HandlerFunc) Handle(ctx context.Context, msg *Message) error

                                                                                    Handle redirects this call to the func that was provided.

                                                                                    type ListenerHandle

                                                                                    type ListenerHandle struct {
                                                                                    	// contains filtered or unexported fields
                                                                                    }

                                                                                      ListenerHandle provides the ability to close or listen to the close of a Receiver

                                                                                      func (*ListenerHandle) Close

                                                                                      func (lc *ListenerHandle) Close(ctx context.Context) error

                                                                                        Close will close the listener

                                                                                        func (*ListenerHandle) Done

                                                                                        func (lc *ListenerHandle) Done() <-chan struct{}

                                                                                          Done will close the channel when the listener has stopped

                                                                                          func (*ListenerHandle) Err

                                                                                          func (lc *ListenerHandle) Err() error

                                                                                            Err will return the last error encountered

                                                                                            type MaxMessageSizeInBytes

                                                                                            type MaxMessageSizeInBytes int

                                                                                              MaxMessageSizeInBytes is the max number of bytes allowed by Azure Service Bus

                                                                                              const (
                                                                                              	// StandardMaxMessageSizeInBytes is the maximum number of bytes in a message for the Standard tier
                                                                                              	StandardMaxMessageSizeInBytes MaxMessageSizeInBytes = 256000
                                                                                              	// PremiumMaxMessageSizeInBytes is the maximum number of bytes in a message for the Premium tier
                                                                                              	PremiumMaxMessageSizeInBytes MaxMessageSizeInBytes = 1000000
                                                                                              )

                                                                                              type Message

                                                                                              type Message struct {
                                                                                              	ContentType      string
                                                                                              	CorrelationID    string
                                                                                              	Data             []byte
                                                                                              	DeliveryCount    uint32
                                                                                              	SessionID        *string
                                                                                              	GroupSequence    *uint32
                                                                                              	ID               string
                                                                                              	Label            string
                                                                                              	ReplyTo          string
                                                                                              	ReplyToGroupID   string
                                                                                              	To               string
                                                                                              	TTL              *time.Duration
                                                                                              	LockToken        *uuid.UUID
                                                                                              	SystemProperties *SystemProperties
                                                                                              	UserProperties   map[string]interface{}
                                                                                              	Format           uint32
                                                                                              	// contains filtered or unexported fields
                                                                                              }

                                                                                                Message is an Service Bus message to be sent or received

                                                                                                func NewMessage

                                                                                                func NewMessage(data []byte) *Message

                                                                                                  NewMessage builds an Message from a slice of data

                                                                                                  func NewMessageFromString

                                                                                                  func NewMessageFromString(message string) *Message

                                                                                                    NewMessageFromString builds an Message from a string message

                                                                                                    func (*Message) Abandon

                                                                                                    func (m *Message) Abandon(ctx context.Context) error

                                                                                                      Abandon will notify Azure Service Bus the message failed but should be re-queued for delivery.

                                                                                                      func (*Message) AbandonAction

                                                                                                      func (m *Message) AbandonAction() DispositionAction

                                                                                                        AbandonAction will notify Azure Service Bus the message failed but should be re-queued for delivery.

                                                                                                        func (*Message) Complete

                                                                                                        func (m *Message) Complete(ctx context.Context) error

                                                                                                          Complete will notify Azure Service Bus that the message was successfully handled and should be deleted from the queue

                                                                                                          func (*Message) CompleteAction

                                                                                                          func (m *Message) CompleteAction() DispositionAction

                                                                                                            CompleteAction will notify Azure Service Bus that the message was successfully handled and should be deleted from the queue

                                                                                                            func (*Message) DeadLetter

                                                                                                            func (m *Message) DeadLetter(ctx context.Context, err error) error

                                                                                                              DeadLetter will notify Azure Service Bus the message failed and should not re-queued

                                                                                                              func (*Message) DeadLetterAction

                                                                                                              func (m *Message) DeadLetterAction(err error) DispositionAction

                                                                                                                DeadLetterAction will notify Azure Service Bus the message failed and should not re-queued

                                                                                                                func (*Message) DeadLetterWithInfo

                                                                                                                func (m *Message) DeadLetterWithInfo(ctx context.Context, err error, condition MessageErrorCondition, additionalData map[string]string) error

                                                                                                                  DeadLetterWithInfo will notify Azure Service Bus the message failed and should not be re-queued with additional context

                                                                                                                  func (*Message) DeadLetterWithInfoAction

                                                                                                                  func (m *Message) DeadLetterWithInfoAction(err error, condition MessageErrorCondition, additionalData map[string]string) DispositionAction

                                                                                                                    DeadLetterWithInfoAction will notify Azure Service Bus the message failed and should not be re-queued with additional context

                                                                                                                    func (*Message) Defer

                                                                                                                    func (m *Message) Defer(ctx context.Context) error

                                                                                                                      Defer will set aside the message for later processing

                                                                                                                      When a queue or subscription client receives a message that it is willing to process, but for which processing is not currently possible due to special circumstances inside of the application, it has the option of "deferring" retrieval of the message to a later point. The message remains in the queue or subscription, but it is set aside.

                                                                                                                      Deferral is a feature specifically created for workflow processing scenarios. Workflow frameworks may require certain operations to be processed in a particular order, and may have to postpone processing of some received messages until prescribed prior work that is informed by other messages has been completed.

                                                                                                                      A simple illustrative example is an order processing sequence in which a payment notification from an external payment provider appears in a system before the matching purchase order has been propagated from the store front to the fulfillment system. In that case, the fulfillment system might defer processing the payment notification until there is an order with which to associate it. In rendezvous scenarios, where messages from different sources drive a workflow forward, the real-time execution order may indeed be correct, but the messages reflecting the outcomes may arrive out of order.

                                                                                                                      Ultimately, deferral aids in reordering messages from the arrival order into an order in which they can be processed, while leaving those messages safely in the message store for which processing needs to be postponed.

                                                                                                                      func (*Message) GetKeyValues

                                                                                                                      func (m *Message) GetKeyValues() map[string]interface{}

                                                                                                                        GetKeyValues implements tab.Carrier

                                                                                                                        func (*Message) ScheduleAt

                                                                                                                        func (m *Message) ScheduleAt(t time.Time)

                                                                                                                          ScheduleAt will ensure Azure Service Bus delivers the message after the time specified (usually within 1 minute after the specified time)

                                                                                                                          func (*Message) Set

                                                                                                                          func (m *Message) Set(key string, value interface{})

                                                                                                                            Set implements tab.Carrier

                                                                                                                            type MessageBatch

                                                                                                                            type MessageBatch struct {
                                                                                                                            	*Message
                                                                                                                            
                                                                                                                            	MaxSize MaxMessageSizeInBytes
                                                                                                                            	// contains filtered or unexported fields
                                                                                                                            }

                                                                                                                              MessageBatch represents a batch of messages to send to Service Bus in a single message

                                                                                                                              func NewMessageBatch

                                                                                                                              func NewMessageBatch(maxSize MaxMessageSizeInBytes, messageID string, opts *BatchOptions) *MessageBatch

                                                                                                                                NewMessageBatch builds a new message batch with a default standard max message size

                                                                                                                                func (*MessageBatch) Add

                                                                                                                                func (mb *MessageBatch) Add(m *Message) (bool, error)

                                                                                                                                  Add adds a message to the batch if the message will not exceed the max size of the batch

                                                                                                                                  func (*MessageBatch) Clear

                                                                                                                                  func (mb *MessageBatch) Clear()

                                                                                                                                    Clear will zero out the batch size and clear the buffered messages

                                                                                                                                    func (*MessageBatch) Size

                                                                                                                                    func (mb *MessageBatch) Size() int

                                                                                                                                      Size is the number of bytes in the message batch

                                                                                                                                      type MessageBatchIterator

                                                                                                                                      type MessageBatchIterator struct {
                                                                                                                                      	Messages []*Message
                                                                                                                                      	Cursor   int
                                                                                                                                      	MaxSize  MaxMessageSizeInBytes
                                                                                                                                      }

                                                                                                                                        MessageBatchIterator provides an easy way to iterate over a slice of messages to reliably create batches

                                                                                                                                        func NewMessageBatchIterator

                                                                                                                                        func NewMessageBatchIterator(maxBatchSize MaxMessageSizeInBytes, msgs ...*Message) *MessageBatchIterator

                                                                                                                                          NewMessageBatchIterator wraps a slice of Message pointers to allow it to be made into a MessageIterator.

                                                                                                                                          func (*MessageBatchIterator) Done

                                                                                                                                          func (mbi *MessageBatchIterator) Done() bool

                                                                                                                                            Done communicates whether there are more messages remaining to be iterated over.

                                                                                                                                            func (*MessageBatchIterator) Next

                                                                                                                                            func (mbi *MessageBatchIterator) Next(messageID string, opts *BatchOptions) (*MessageBatch, error)

                                                                                                                                              Next fetches the batch of messages in the message slice at a position one larger than the last one accessed.

                                                                                                                                              type MessageErrorCondition

                                                                                                                                              type MessageErrorCondition string

                                                                                                                                                MessageErrorCondition represents a well-known collection of AMQP errors

                                                                                                                                                const (
                                                                                                                                                	ErrorInternalError         MessageErrorCondition = "amqp:internal-error"
                                                                                                                                                	ErrorNotFound              MessageErrorCondition = "amqp:not-found"
                                                                                                                                                	ErrorUnauthorizedAccess    MessageErrorCondition = "amqp:unauthorized-access"
                                                                                                                                                	ErrorDecodeError           MessageErrorCondition = "amqp:decode-error"
                                                                                                                                                	ErrorResourceLimitExceeded MessageErrorCondition = "amqp:resource-limit-exceeded"
                                                                                                                                                	ErrorNotAllowed            MessageErrorCondition = "amqp:not-allowed"
                                                                                                                                                	ErrorInvalidField          MessageErrorCondition = "amqp:invalid-field"
                                                                                                                                                	ErrorNotImplemented        MessageErrorCondition = "amqp:not-implemented"
                                                                                                                                                	ErrorResourceLocked        MessageErrorCondition = "amqp:resource-locked"
                                                                                                                                                	ErrorPreconditionFailed    MessageErrorCondition = "amqp:precondition-failed"
                                                                                                                                                	ErrorResourceDeleted       MessageErrorCondition = "amqp:resource-deleted"
                                                                                                                                                	ErrorIllegalState          MessageErrorCondition = "amqp:illegal-state"
                                                                                                                                                )

                                                                                                                                                  Error Conditions

                                                                                                                                                  type MessageIterator

                                                                                                                                                  type MessageIterator interface {
                                                                                                                                                  	Done() bool
                                                                                                                                                  	Next(context.Context) (*Message, error)
                                                                                                                                                  }

                                                                                                                                                    MessageIterator offers a simple mechanism for iterating over a list of

                                                                                                                                                    Example
                                                                                                                                                    Output:
                                                                                                                                                    
                                                                                                                                                    hello
                                                                                                                                                    world
                                                                                                                                                    

                                                                                                                                                    type MessageSession

                                                                                                                                                    type MessageSession struct {
                                                                                                                                                    	*Receiver
                                                                                                                                                    	// contains filtered or unexported fields
                                                                                                                                                    }

                                                                                                                                                      MessageSession represents and allows for interaction with a Service Bus Session.

                                                                                                                                                      func (*MessageSession) Close

                                                                                                                                                      func (ms *MessageSession) Close()

                                                                                                                                                        Close communicates that Handler receiving messages should no longer continue to be executed. This can happen when: - A Handler recognizes that no further messages will come to this session. - A Handler has given up on receiving more messages before a session. Future messages should be delegated to the next

                                                                                                                                                        available session client.
                                                                                                                                                        

                                                                                                                                                        func (*MessageSession) ListSessions

                                                                                                                                                        func (ms *MessageSession) ListSessions(ctx context.Context) ([]byte, error)

                                                                                                                                                          ListSessions will list all of the sessions available

                                                                                                                                                          func (*MessageSession) LockedUntil

                                                                                                                                                          func (ms *MessageSession) LockedUntil() time.Time

                                                                                                                                                            LockedUntil fetches the moment in time when the Session lock held by this Receiver will expire.

                                                                                                                                                            func (*MessageSession) RenewLock

                                                                                                                                                            func (ms *MessageSession) RenewLock(ctx context.Context) error

                                                                                                                                                              RenewLock requests that the Service Bus Server renews this client's lock on an existing Session.

                                                                                                                                                              func (*MessageSession) SessionID

                                                                                                                                                              func (ms *MessageSession) SessionID() *string

                                                                                                                                                                SessionID gets the unique identifier of the session being interacted with by this MessageSession.

                                                                                                                                                                func (*MessageSession) SetState

                                                                                                                                                                func (ms *MessageSession) SetState(ctx context.Context, state []byte) error

                                                                                                                                                                  SetState updates the current State associated with this Session.

                                                                                                                                                                  func (*MessageSession) State

                                                                                                                                                                  func (ms *MessageSession) State(ctx context.Context) ([]byte, error)

                                                                                                                                                                    State retrieves the current State associated with this Session. https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-request-response#get-session-state

                                                                                                                                                                    type MessageSliceIterator

                                                                                                                                                                    type MessageSliceIterator struct {
                                                                                                                                                                    	Target []*Message
                                                                                                                                                                    	Cursor int
                                                                                                                                                                    }

                                                                                                                                                                      MessageSliceIterator is a wrapper, which lets any slice of Message pointers be used as a MessageIterator.

                                                                                                                                                                      func AsMessageSliceIterator

                                                                                                                                                                      func AsMessageSliceIterator(target []*Message) *MessageSliceIterator

                                                                                                                                                                        AsMessageSliceIterator wraps a slice of Message pointers to allow it to be made into a MessageIterator.

                                                                                                                                                                        func (MessageSliceIterator) Done

                                                                                                                                                                        func (ms MessageSliceIterator) Done() bool

                                                                                                                                                                          Done communicates whether there are more messages remaining to be iterated over.

                                                                                                                                                                          func (*MessageSliceIterator) Next

                                                                                                                                                                            Next fetches the Message in the slice at a position one larger than the last one accessed.

                                                                                                                                                                            type MessageStatus

                                                                                                                                                                            type MessageStatus dispositionStatus

                                                                                                                                                                              MessageStatus defines an acceptable Message disposition status.

                                                                                                                                                                              const (
                                                                                                                                                                              	// Complete exposes completedDisposition
                                                                                                                                                                              	Complete MessageStatus = MessageStatus(completedDisposition)
                                                                                                                                                                              	// Abort exposes abandonedDisposition
                                                                                                                                                                              	Abort MessageStatus = MessageStatus(abandonedDisposition)
                                                                                                                                                                              )

                                                                                                                                                                              type MiddlewareFunc

                                                                                                                                                                              type MiddlewareFunc func(next RestHandler) RestHandler

                                                                                                                                                                                MiddlewareFunc allows a consumer of the entity manager to inject handlers within the request / response pipeline

                                                                                                                                                                                The example below adds the atom xml content type to the request, calls the next middleware and returns the result.

                                                                                                                                                                                addAtomXMLContentType MiddlewareFunc = func(next RestHandler) RestHandler {

                                                                                                                                                                                	return func(ctx context.Context, req *http.Request) (res *http.Response, e error) {
                                                                                                                                                                                		if req.Method != http.MethodGet && req.Method != http.MethodHead {
                                                                                                                                                                                			req.Header.Add("content-Type", "application/atom+xml;type=entry;charset=utf-8")
                                                                                                                                                                                		}
                                                                                                                                                                                		return next(ctx, req)
                                                                                                                                                                                	}
                                                                                                                                                                                }
                                                                                                                                                                                

                                                                                                                                                                                func TraceReqAndResponseMiddleware

                                                                                                                                                                                func TraceReqAndResponseMiddleware() MiddlewareFunc

                                                                                                                                                                                  TraceReqAndResponseMiddleware will print the dump of the management request and response.

                                                                                                                                                                                  This should only be used for debugging or educational purposes.

                                                                                                                                                                                  type Namespace

                                                                                                                                                                                  type Namespace struct {
                                                                                                                                                                                  	Name          string
                                                                                                                                                                                  	Suffix        string
                                                                                                                                                                                  	TokenProvider auth.TokenProvider
                                                                                                                                                                                  	Environment   azure.Environment
                                                                                                                                                                                  	// contains filtered or unexported fields
                                                                                                                                                                                  }

                                                                                                                                                                                    Namespace provides a simplified facade over the AMQP implementation of Azure Service Bus and is the entry point for using Queues, Topics and Subscriptions

                                                                                                                                                                                    func NewNamespace

                                                                                                                                                                                    func NewNamespace(opts ...NamespaceOption) (*Namespace, error)

                                                                                                                                                                                      NewNamespace creates a new namespace configured through NamespaceOption(s)

                                                                                                                                                                                      func (*Namespace) NewQueue

                                                                                                                                                                                      func (ns *Namespace) NewQueue(name string, opts ...QueueOption) (*Queue, error)

                                                                                                                                                                                        NewQueue creates a new Queue Sender / Receiver

                                                                                                                                                                                        func (*Namespace) NewQueueManager

                                                                                                                                                                                        func (ns *Namespace) NewQueueManager() *QueueManager

                                                                                                                                                                                          NewQueueManager creates a new QueueManager for a Service Bus Namespace

                                                                                                                                                                                          func (*Namespace) NewReceiver

                                                                                                                                                                                          func (ns *Namespace) NewReceiver(ctx context.Context, entityPath string, opts ...ReceiverOption) (*Receiver, error)

                                                                                                                                                                                            NewReceiver creates a new Service Bus message listener given an AMQP client and an entity path

                                                                                                                                                                                            func (*Namespace) NewSender

                                                                                                                                                                                            func (ns *Namespace) NewSender(ctx context.Context, entityPath string, opts ...SenderOption) (*Sender, error)

                                                                                                                                                                                              NewSender creates a new Service Bus message Sender given an AMQP client and entity path

                                                                                                                                                                                              func (*Namespace) NewSubscriptionManager

                                                                                                                                                                                              func (ns *Namespace) NewSubscriptionManager(topicName string) (*SubscriptionManager, error)

                                                                                                                                                                                                NewSubscriptionManager creates a new SubscriptionManger for a Service Bus Namespace

                                                                                                                                                                                                func (*Namespace) NewTopic

                                                                                                                                                                                                func (ns *Namespace) NewTopic(name string, opts ...TopicOption) (*Topic, error)

                                                                                                                                                                                                  NewTopic creates a new Topic Sender

                                                                                                                                                                                                  func (*Namespace) NewTopicManager

                                                                                                                                                                                                  func (ns *Namespace) NewTopicManager() *TopicManager

                                                                                                                                                                                                    NewTopicManager creates a new TopicManager for a Service Bus Namespace

                                                                                                                                                                                                    type NamespaceOption

                                                                                                                                                                                                    type NamespaceOption func(h *Namespace) error

                                                                                                                                                                                                      NamespaceOption provides structure for configuring a new Service Bus namespace

                                                                                                                                                                                                      func NamespaceWithAzureEnvironment

                                                                                                                                                                                                      func NamespaceWithAzureEnvironment(namespaceName, environmentName string) NamespaceOption

                                                                                                                                                                                                        NamespaceWithAzureEnvironment sets the namespace's Environment, Suffix and ResourceURI parameters according to the Azure Environment defined in "github.com/Azure/go-autorest/autorest/azure" package. This allows to configure the library to be used in the different Azure clouds. environmentName is the name of the cloud as defined in autorest : https://github.com/Azure/go-autorest/blob/b076c1437d051bf4c328db428b70f4fe22ad38b0/autorest/azure/environments.go#L34-L39

                                                                                                                                                                                                        func NamespaceWithConnectionString

                                                                                                                                                                                                        func NamespaceWithConnectionString(connStr string) NamespaceOption

                                                                                                                                                                                                          NamespaceWithConnectionString configures a namespace with the information provided in a Service Bus connection string

                                                                                                                                                                                                          func NamespaceWithEnvironmentBinding

                                                                                                                                                                                                          func NamespaceWithEnvironmentBinding(name string) NamespaceOption

                                                                                                                                                                                                            NamespaceWithEnvironmentBinding configures a namespace using the environment details. It uses one of the following methods:

                                                                                                                                                                                                            1. Client Credentials: attempt to authenticate with a Service Principal via "AZURE_TENANT_ID", "AZURE_CLIENT_ID" and

                                                                                                                                                                                                            "AZURE_CLIENT_SECRET"
                                                                                                                                                                                                            

                                                                                                                                                                                                            2. Client Certificate: attempt to authenticate with a Service Principal via "AZURE_TENANT_ID", "AZURE_CLIENT_ID",

                                                                                                                                                                                                            "AZURE_CERTIFICATE_PATH" and "AZURE_CERTIFICATE_PASSWORD"
                                                                                                                                                                                                            

                                                                                                                                                                                                            3. Managed Identity (MI): attempt to authenticate via the MI assigned to the Azure resource

                                                                                                                                                                                                            The Azure Environment used can be specified using the name of the Azure Environment set in "AZURE_ENVIRONMENT" var.

                                                                                                                                                                                                            func NamespaceWithTLSConfig

                                                                                                                                                                                                            func NamespaceWithTLSConfig(tlsConfig *tls.Config) NamespaceOption

                                                                                                                                                                                                              NamespaceWithTLSConfig appends to the TLS config.

                                                                                                                                                                                                              func NamespaceWithTokenProvider

                                                                                                                                                                                                              func NamespaceWithTokenProvider(provider auth.TokenProvider) NamespaceOption

                                                                                                                                                                                                                NamespaceWithTokenProvider sets the token provider on the namespace

                                                                                                                                                                                                                func NamespaceWithUserAgent

                                                                                                                                                                                                                func NamespaceWithUserAgent(userAgent string) NamespaceOption

                                                                                                                                                                                                                  NamespaceWithUserAgent appends to the root user-agent value.

                                                                                                                                                                                                                  func NamespaceWithWebSocket

                                                                                                                                                                                                                  func NamespaceWithWebSocket() NamespaceOption

                                                                                                                                                                                                                    NamespaceWithWebSocket configures the namespace and all entities to use wss:// rather than amqps://

                                                                                                                                                                                                                    Example
                                                                                                                                                                                                                    Output:
                                                                                                                                                                                                                    
                                                                                                                                                                                                                    Hello World!!!
                                                                                                                                                                                                                    

                                                                                                                                                                                                                    type PeekOption

                                                                                                                                                                                                                    type PeekOption func(*peekIterator) error

                                                                                                                                                                                                                      PeekOption allows customization of parameters when querying a Service Bus entity for messages without committing to processing them.

                                                                                                                                                                                                                      func PeekFromSequenceNumber

                                                                                                                                                                                                                      func PeekFromSequenceNumber(seq int64) PeekOption

                                                                                                                                                                                                                        PeekFromSequenceNumber adds a filter to the Peek operation, so that no messages with a Sequence Number less than 'seq' are returned.

                                                                                                                                                                                                                        func PeekWithPageSize

                                                                                                                                                                                                                        func PeekWithPageSize(pageSize int) PeekOption

                                                                                                                                                                                                                          PeekWithPageSize adjusts how many messages are fetched at once while peeking from the server.

                                                                                                                                                                                                                          type Queue

                                                                                                                                                                                                                          type Queue struct {
                                                                                                                                                                                                                          	// contains filtered or unexported fields
                                                                                                                                                                                                                          }

                                                                                                                                                                                                                            Queue represents a Service Bus Queue entity, which offers First In, First Out (FIFO) message delivery to one or more competing consumers. That is, messages are typically expected to be received and processed by the receivers in the order in which they were added to the queue, and each message is received and processed by only one message consumer.

                                                                                                                                                                                                                            Example (GetOrBuildQueue)
                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            myqueue
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            Example (ScheduleAndCancelMessages)
                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            All Messages Scheduled and Cancelled
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            Example (SessionsRoundTrip)
                                                                                                                                                                                                                            Output:
                                                                                                                                                                                                                            
                                                                                                                                                                                                                            FoolishMonkey63
                                                                                                                                                                                                                            FoolishLuddite05
                                                                                                                                                                                                                            JuvenileMonkey80
                                                                                                                                                                                                                            JuvenileLuddite84
                                                                                                                                                                                                                            FoolishLuddite68
                                                                                                                                                                                                                            

                                                                                                                                                                                                                            func (*Queue) Close

                                                                                                                                                                                                                            func (q *Queue) Close(ctx context.Context) error

                                                                                                                                                                                                                              Close the underlying connection to Service Bus

                                                                                                                                                                                                                              func (*Queue) NewDeadLetter

                                                                                                                                                                                                                              func (q *Queue) NewDeadLetter() *DeadLetter

                                                                                                                                                                                                                                NewDeadLetter creates an entity that represents the dead letter sub queue of the queue

                                                                                                                                                                                                                                Azure Service Bus queues and topic subscriptions provide a secondary sub-queue, called a dead-letter queue (DLQ). The dead-letter queue does not need to be explicitly created and cannot be deleted or otherwise managed independent of the main entity.

                                                                                                                                                                                                                                The purpose of the dead-letter queue is to hold messages that cannot be delivered to any receiver, or messages that could not be processed. Messages can then be removed from the DLQ and inspected. An application might, with help of an operator, correct issues and resubmit the message, log the fact that there was an error, and take corrective action.

                                                                                                                                                                                                                                From an API and protocol perspective, the DLQ is mostly similar to any other queue, except that messages can only be submitted via the dead-letter operation of the parent entity. In addition, time-to-live is not observed, and you can't dead-letter a message from a DLQ. The dead-letter queue fully supports peek-lock delivery and transactional operations.

                                                                                                                                                                                                                                Note that there is no automatic cleanup of the DLQ. Messages remain in the DLQ until you explicitly retrieve them from the DLQ and call Complete() on the dead-letter message.

                                                                                                                                                                                                                                func (*Queue) NewDeadLetterReceiver

                                                                                                                                                                                                                                func (q *Queue) NewDeadLetterReceiver(ctx context.Context, opts ...ReceiverOption) (ReceiveOner, error)

                                                                                                                                                                                                                                  NewDeadLetterReceiver builds a receiver for the Queue's dead letter queue

                                                                                                                                                                                                                                  func (*Queue) NewReceiver

                                                                                                                                                                                                                                  func (q *Queue) NewReceiver(ctx context.Context, opts ...ReceiverOption) (*Receiver, error)

                                                                                                                                                                                                                                    NewReceiver will create a new Receiver for receiving messages off of a queue

                                                                                                                                                                                                                                    func (*Queue) NewSender

                                                                                                                                                                                                                                    func (q *Queue) NewSender(ctx context.Context, opts ...SenderOption) (*Sender, error)

                                                                                                                                                                                                                                      NewSender will create a new Sender for sending messages to the queue

                                                                                                                                                                                                                                      func (*Queue) NewSession

                                                                                                                                                                                                                                      func (q *Queue) NewSession(sessionID *string) *QueueSession

                                                                                                                                                                                                                                        NewSession will create a new session based receiver and sender for the queue

                                                                                                                                                                                                                                        Microsoft Azure Service Bus sessions enable joint and ordered handling of unbounded sequences of related messages. To realize a FIFO guarantee in Service Bus, use Sessions. Service Bus is not prescriptive about the nature of the relationship between the messages, and also does not define a particular model for determining where a message sequence starts or ends.

                                                                                                                                                                                                                                        func (*Queue) NewTransferDeadLetter

                                                                                                                                                                                                                                        func (q *Queue) NewTransferDeadLetter() *TransferDeadLetter

                                                                                                                                                                                                                                          NewTransferDeadLetter creates an entity that represents the transfer dead letter sub queue of the queue

                                                                                                                                                                                                                                          Messages will be sent to the transfer dead-letter queue under the following conditions:

                                                                                                                                                                                                                                          - A message passes through more than 3 queues or topics that are chained together.
                                                                                                                                                                                                                                          - The destination queue or topic is disabled or deleted.
                                                                                                                                                                                                                                          - The destination queue or topic exceeds the maximum entity size.
                                                                                                                                                                                                                                          

                                                                                                                                                                                                                                          func (*Queue) NewTransferDeadLetterReceiver

                                                                                                                                                                                                                                          func (q *Queue) NewTransferDeadLetterReceiver(ctx context.Context, opts ...ReceiverOption) (ReceiveOner, error)

                                                                                                                                                                                                                                            NewTransferDeadLetterReceiver builds a receiver for the Queue's transfer dead letter queue

                                                                                                                                                                                                                                            Messages will be sent to the transfer dead-letter queue under the following conditions:

                                                                                                                                                                                                                                            - A message passes through more than 3 queues or topics that are chained together.
                                                                                                                                                                                                                                            - The destination queue or topic is disabled or deleted.
                                                                                                                                                                                                                                            - The destination queue or topic exceeds the maximum entity size.
                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                            func (*Queue) Receive

                                                                                                                                                                                                                                            func (q *Queue) Receive(ctx context.Context, handler Handler) error

                                                                                                                                                                                                                                              Receive subscribes for messages sent to the Queue. If the messages not within a session, messages will arrive unordered.

                                                                                                                                                                                                                                              Handler must call a disposition action such as Complete, Abandon, Deadletter on the message. If the messages does not have a disposition set, the Queue's DefaultDisposition will be used.

                                                                                                                                                                                                                                              If the handler returns an error, the receive loop will be terminated.

                                                                                                                                                                                                                                              Example
                                                                                                                                                                                                                                              Output:
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              Example (Second)
                                                                                                                                                                                                                                              Output:
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              

                                                                                                                                                                                                                                              func (*Queue) ReceiveOne

                                                                                                                                                                                                                                              func (q *Queue) ReceiveOne(ctx context.Context, handler Handler) error

                                                                                                                                                                                                                                                ReceiveOne will listen to receive a single message. ReceiveOne will only wait as long as the context allows.

                                                                                                                                                                                                                                                Handler must call a disposition action such as Complete, Abandon, Deadletter on the message. If the messages does not have a disposition set, the Queue's DefaultDisposition will be used.

                                                                                                                                                                                                                                                func (*Queue) Send

                                                                                                                                                                                                                                                func (q *Queue) Send(ctx context.Context, msg *Message) error

                                                                                                                                                                                                                                                  Send sends messages to the Queue

                                                                                                                                                                                                                                                  Example
                                                                                                                                                                                                                                                  Output:
                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                  func (*Queue) SendBatch

                                                                                                                                                                                                                                                  func (q *Queue) SendBatch(ctx context.Context, iterator BatchIterator) error

                                                                                                                                                                                                                                                    SendBatch sends a batch of messages to the Queue

                                                                                                                                                                                                                                                    type QueueDescription

                                                                                                                                                                                                                                                    type QueueDescription struct {
                                                                                                                                                                                                                                                    	XMLName xml.Name `xml:"QueueDescription"`
                                                                                                                                                                                                                                                    	BaseEntityDescription
                                                                                                                                                                                                                                                    	LockDuration                        *string       `xml:"LockDuration,omitempty"`               // LockDuration - ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.
                                                                                                                                                                                                                                                    	MaxSizeInMegabytes                  *int32        `xml:"MaxSizeInMegabytes,omitempty"`         // MaxSizeInMegabytes - The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.
                                                                                                                                                                                                                                                    	RequiresDuplicateDetection          *bool         `xml:"RequiresDuplicateDetection,omitempty"` // RequiresDuplicateDetection - A value indicating if this queue requires duplicate detection.
                                                                                                                                                                                                                                                    	RequiresSession                     *bool         `xml:"RequiresSession,omitempty"`
                                                                                                                                                                                                                                                    	DefaultMessageTimeToLive            *string       `xml:"DefaultMessageTimeToLive,omitempty"`            // DefaultMessageTimeToLive - ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
                                                                                                                                                                                                                                                    	DeadLetteringOnMessageExpiration    *bool         `xml:"DeadLetteringOnMessageExpiration,omitempty"`    // DeadLetteringOnMessageExpiration - A value that indicates whether this queue has dead letter support when a message expires.
                                                                                                                                                                                                                                                    	DuplicateDetectionHistoryTimeWindow *string       `xml:"DuplicateDetectionHistoryTimeWindow,omitempty"` // DuplicateDetectionHistoryTimeWindow - ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
                                                                                                                                                                                                                                                    	MaxDeliveryCount                    *int32        `xml:"MaxDeliveryCount,omitempty"`                    // MaxDeliveryCount - The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.
                                                                                                                                                                                                                                                    	EnableBatchedOperations             *bool         `xml:"EnableBatchedOperations,omitempty"`             // EnableBatchedOperations - Value that indicates whether server-side batched operations are enabled.
                                                                                                                                                                                                                                                    	SizeInBytes                         *int64        `xml:"SizeInBytes,omitempty"`                         // SizeInBytes - The size of the queue, in bytes.
                                                                                                                                                                                                                                                    	MessageCount                        *int64        `xml:"MessageCount,omitempty"`                        // MessageCount - The number of messages in the queue.
                                                                                                                                                                                                                                                    	IsAnonymousAccessible               *bool         `xml:"IsAnonymousAccessible,omitempty"`
                                                                                                                                                                                                                                                    	Status                              *EntityStatus `xml:"Status,omitempty"`
                                                                                                                                                                                                                                                    	CreatedAt                           *date.Time    `xml:"CreatedAt,omitempty"`
                                                                                                                                                                                                                                                    	UpdatedAt                           *date.Time    `xml:"UpdatedAt,omitempty"`
                                                                                                                                                                                                                                                    	SupportOrdering                     *bool         `xml:"SupportOrdering,omitempty"`
                                                                                                                                                                                                                                                    	AutoDeleteOnIdle                    *string       `xml:"AutoDeleteOnIdle,omitempty"`
                                                                                                                                                                                                                                                    	EnablePartitioning                  *bool         `xml:"EnablePartitioning,omitempty"`
                                                                                                                                                                                                                                                    	EnableExpress                       *bool         `xml:"EnableExpress,omitempty"`
                                                                                                                                                                                                                                                    	CountDetails                        *CountDetails `xml:"CountDetails,omitempty"`
                                                                                                                                                                                                                                                    	ForwardTo                           *string       `xml:"ForwardTo,omitempty"`
                                                                                                                                                                                                                                                    	ForwardDeadLetteredMessagesTo       *string       `xml:"ForwardDeadLetteredMessagesTo,omitempty"` // ForwardDeadLetteredMessagesTo - absolute URI of the entity to forward dead letter messages
                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                      QueueDescription is the content type for Queue management requests

                                                                                                                                                                                                                                                      type QueueEntity

                                                                                                                                                                                                                                                      type QueueEntity struct {
                                                                                                                                                                                                                                                      	*QueueDescription
                                                                                                                                                                                                                                                      	*Entity
                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                        QueueEntity is the Azure Service Bus description of a Queue for management activities

                                                                                                                                                                                                                                                        type QueueManagementOption

                                                                                                                                                                                                                                                        type QueueManagementOption func(*QueueDescription) error

                                                                                                                                                                                                                                                          QueueManagementOption represents named configuration options for queue mutation

                                                                                                                                                                                                                                                          func QueueEntityWithAutoDeleteOnIdle

                                                                                                                                                                                                                                                          func QueueEntityWithAutoDeleteOnIdle(window *time.Duration) QueueManagementOption

                                                                                                                                                                                                                                                            QueueEntityWithAutoDeleteOnIdle configures the queue to automatically delete after the specified idle interval. The minimum duration is 5 minutes.

                                                                                                                                                                                                                                                            func QueueEntityWithAutoForward

                                                                                                                                                                                                                                                            func QueueEntityWithAutoForward(target Targetable) QueueManagementOption

                                                                                                                                                                                                                                                              QueueEntityWithAutoForward configures the queue to automatically forward messages to the specified target.

                                                                                                                                                                                                                                                              The ability to AutoForward to a target requires the connection have management authorization. If the connection string or Azure Active Directory identity used does not have management authorization, an unauthorized error will be returned on the PUT.

                                                                                                                                                                                                                                                              func QueueEntityWithDeadLetteringOnMessageExpiration

                                                                                                                                                                                                                                                              func QueueEntityWithDeadLetteringOnMessageExpiration() QueueManagementOption

                                                                                                                                                                                                                                                                QueueEntityWithDeadLetteringOnMessageExpiration will ensure the queue sends expired messages to the dead letter queue

                                                                                                                                                                                                                                                                func QueueEntityWithDuplicateDetection

                                                                                                                                                                                                                                                                func QueueEntityWithDuplicateDetection(window *time.Duration) QueueManagementOption

                                                                                                                                                                                                                                                                  QueueEntityWithDuplicateDetection configures the queue to detect duplicates for a given time window. If window is not specified, then it uses the default of 10 minutes.

                                                                                                                                                                                                                                                                  func QueueEntityWithForwardDeadLetteredMessagesTo

                                                                                                                                                                                                                                                                  func QueueEntityWithForwardDeadLetteredMessagesTo(target Targetable) QueueManagementOption

                                                                                                                                                                                                                                                                    QueueEntityWithForwardDeadLetteredMessagesTo configures the queue to automatically forward dead letter messages to the specified target.

                                                                                                                                                                                                                                                                    The ability to forward dead letter messages to a target requires the connection have management authorization. If the connection string or Azure Active Directory identity used does not have management authorization, an unauthorized error will be returned on the PUT.

                                                                                                                                                                                                                                                                    func QueueEntityWithLockDuration

                                                                                                                                                                                                                                                                    func QueueEntityWithLockDuration(window *time.Duration) QueueManagementOption

                                                                                                                                                                                                                                                                      QueueEntityWithLockDuration configures the queue to have a duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.

                                                                                                                                                                                                                                                                      func QueueEntityWithMaxDeliveryCount

                                                                                                                                                                                                                                                                      func QueueEntityWithMaxDeliveryCount(count int32) QueueManagementOption

                                                                                                                                                                                                                                                                        QueueEntityWithMaxDeliveryCount configures the queue to have a maximum number of delivery attempts before dead-lettering the message

                                                                                                                                                                                                                                                                        func QueueEntityWithMaxSizeInMegabytes

                                                                                                                                                                                                                                                                        func QueueEntityWithMaxSizeInMegabytes(size int) QueueManagementOption

                                                                                                                                                                                                                                                                          QueueEntityWithMaxSizeInMegabytes configures the maximum size of the queue in megabytes (1 * 1024 - 5 * 1024), which is the size of the memory allocated for the queue. Default is 1 MB (1 * 1024).

                                                                                                                                                                                                                                                                          size must be between 1024 and 5 * 1024 for the Standard sku and up to 80 * 1024 for Premium sku

                                                                                                                                                                                                                                                                          func QueueEntityWithMessageTimeToLive

                                                                                                                                                                                                                                                                          func QueueEntityWithMessageTimeToLive(window *time.Duration) QueueManagementOption

                                                                                                                                                                                                                                                                            QueueEntityWithMessageTimeToLive configures the queue to set a time to live on messages. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. If nil, defaults to 14 days.

                                                                                                                                                                                                                                                                            func QueueEntityWithPartitioning

                                                                                                                                                                                                                                                                            func QueueEntityWithPartitioning() QueueManagementOption

                                                                                                                                                                                                                                                                              QueueEntityWithPartitioning ensure the created queue will be a partitioned queue. Partitioned queues offer increased storage and availability compared to non-partitioned queues with the trade-off of requiring the following to ensure FIFO message retrieval:

                                                                                                                                                                                                                                                                              SessionId. If a message has the SessionId property set, then Service Bus uses the SessionId property as the partition key. This way, all messages that belong to the same session are assigned to the same fragment and handled by the same message broker. This allows Service Bus to guarantee message ordering as well as the consistency of session states.

                                                                                                                                                                                                                                                                              PartitionKey. If a message has the PartitionKey property set but not the SessionId property, then Service Bus uses the PartitionKey property as the partition key. Use the PartitionKey property to send non-sessionful transactional messages. The partition key ensures that all messages that are sent within a transaction are handled by the same messaging broker.

                                                                                                                                                                                                                                                                              MessageId. If the queue has the RequiresDuplicationDetection property set to true, then the MessageId property serves as the partition key if the SessionId or a PartitionKey properties are not set. This ensures that all copies of the same message are handled by the same message broker and, thus, allows Service Bus to detect and eliminate duplicate messages

                                                                                                                                                                                                                                                                              func QueueEntityWithRequiredSessions

                                                                                                                                                                                                                                                                              func QueueEntityWithRequiredSessions() QueueManagementOption

                                                                                                                                                                                                                                                                                QueueEntityWithRequiredSessions will ensure the queue requires senders and receivers to have sessionIDs

                                                                                                                                                                                                                                                                                type QueueManager

                                                                                                                                                                                                                                                                                type QueueManager struct {
                                                                                                                                                                                                                                                                                	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                  QueueManager provides CRUD functionality for Service Bus Queues

                                                                                                                                                                                                                                                                                  func (*QueueManager) Delete

                                                                                                                                                                                                                                                                                  func (qm *QueueManager) Delete(ctx context.Context, name string) error

                                                                                                                                                                                                                                                                                    Delete deletes a Service Bus Queue entity by name

                                                                                                                                                                                                                                                                                    func (QueueManager) Execute

                                                                                                                                                                                                                                                                                    func (em QueueManager) Execute(ctx context.Context, method string, entityPath string, body io.Reader, mw ...MiddlewareFunc) (*http.Response, error)

                                                                                                                                                                                                                                                                                    func (*QueueManager) Get

                                                                                                                                                                                                                                                                                    func (qm *QueueManager) Get(ctx context.Context, name string) (*QueueEntity, error)

                                                                                                                                                                                                                                                                                      Get fetches a Service Bus Queue entity by name

                                                                                                                                                                                                                                                                                      func (*QueueManager) List

                                                                                                                                                                                                                                                                                      func (qm *QueueManager) List(ctx context.Context) ([]*QueueEntity, error)

                                                                                                                                                                                                                                                                                        List fetches all of the queues for a Service Bus Namespace

                                                                                                                                                                                                                                                                                        func (QueueManager) Post

                                                                                                                                                                                                                                                                                        func (em QueueManager) Post(ctx context.Context, entityPath string, body []byte, mw ...MiddlewareFunc) (*http.Response, error)

                                                                                                                                                                                                                                                                                          Post performs an HTTP POST for a given entity path and body

                                                                                                                                                                                                                                                                                          func (*QueueManager) Put

                                                                                                                                                                                                                                                                                          func (qm *QueueManager) Put(ctx context.Context, name string, opts ...QueueManagementOption) (*QueueEntity, error)

                                                                                                                                                                                                                                                                                            Put creates or updates a Service Bus Queue

                                                                                                                                                                                                                                                                                            func (QueueManager) TokenProvider

                                                                                                                                                                                                                                                                                            func (em QueueManager) TokenProvider() auth.TokenProvider

                                                                                                                                                                                                                                                                                              TokenProvider generates authorization tokens for communicating with the Service Bus management API

                                                                                                                                                                                                                                                                                              func (QueueManager) Use

                                                                                                                                                                                                                                                                                              func (em QueueManager) Use(mw ...MiddlewareFunc)

                                                                                                                                                                                                                                                                                                Use adds middleware to the middleware mwStack

                                                                                                                                                                                                                                                                                                type QueueOption

                                                                                                                                                                                                                                                                                                type QueueOption func(*Queue) error

                                                                                                                                                                                                                                                                                                  QueueOption represents named options for assisting Queue message handling

                                                                                                                                                                                                                                                                                                  func QueueWithPrefetchCount

                                                                                                                                                                                                                                                                                                  func QueueWithPrefetchCount(prefetch uint32) QueueOption

                                                                                                                                                                                                                                                                                                    QueueWithPrefetchCount configures the queue to attempt to fetch the number of messages specified by the prefetch count at one time.

                                                                                                                                                                                                                                                                                                    The default is 1 message at a time.

                                                                                                                                                                                                                                                                                                    Caution: Using PeekLock, messages have a set lock timeout, which can be renewed. By setting a high prefetch count, a local queue of messages could build up and cause message locks to expire before the message lands in the handler. If this happens, the message disposition will fail and will be re-queued and processed again.

                                                                                                                                                                                                                                                                                                    func QueueWithReceiveAndDelete

                                                                                                                                                                                                                                                                                                    func QueueWithReceiveAndDelete() QueueOption

                                                                                                                                                                                                                                                                                                      QueueWithReceiveAndDelete configures a queue to pop and delete messages off of the queue upon receiving the message. This differs from the default, PeekLock, where PeekLock receives a message, locks it for a period of time, then sends a disposition to the broker when the message has been processed.

                                                                                                                                                                                                                                                                                                      type QueueSession

                                                                                                                                                                                                                                                                                                      type QueueSession struct {
                                                                                                                                                                                                                                                                                                      	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                        QueueSession wraps Service Bus session functionality over a Queue

                                                                                                                                                                                                                                                                                                        func NewQueueSession

                                                                                                                                                                                                                                                                                                        func NewQueueSession(builder SendAndReceiveBuilder, sessionID *string) *QueueSession

                                                                                                                                                                                                                                                                                                          NewQueueSession creates a new session sender and receiver to communicate with a Service Bus queue.

                                                                                                                                                                                                                                                                                                          Microsoft Azure Service Bus sessions enable joint and ordered handling of unbounded sequences of related messages. To realize a FIFO guarantee in Service Bus, use Sessions. Service Bus is not prescriptive about the nature of the relationship between the messages, and also does not define a particular model for determining where a message sequence starts or ends.

                                                                                                                                                                                                                                                                                                          func (*QueueSession) Close

                                                                                                                                                                                                                                                                                                          func (qs *QueueSession) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                            Close the underlying connection to Service Bus

                                                                                                                                                                                                                                                                                                            func (*QueueSession) ManagementPath

                                                                                                                                                                                                                                                                                                            func (qs *QueueSession) ManagementPath() string

                                                                                                                                                                                                                                                                                                              ManagementPath provides an addressable path to the Entity management endpoint

                                                                                                                                                                                                                                                                                                              func (*QueueSession) ReceiveDeferred

                                                                                                                                                                                                                                                                                                              func (qs *QueueSession) ReceiveDeferred(ctx context.Context, handler Handler, mode ReceiveMode, sequenceNumbers ...int64) error

                                                                                                                                                                                                                                                                                                                ReceiveDeferred will receive and handle a set of deferred messages

                                                                                                                                                                                                                                                                                                                When a queue or subscription client receives a message that it is willing to process, but for which processing is not currently possible due to special circumstances inside of the application, it has the option of "deferring" retrieval of the message to a later point. The message remains in the queue or subscription, but it is set aside.

                                                                                                                                                                                                                                                                                                                Deferral is a feature specifically created for workflow processing scenarios. Workflow frameworks may require certain operations to be processed in a particular order, and may have to postpone processing of some received messages until prescribed prior work that is informed by other messages has been completed.

                                                                                                                                                                                                                                                                                                                A simple illustrative example is an order processing sequence in which a payment notification from an external payment provider appears in a system before the matching purchase order has been propagated from the store front to the fulfillment system. In that case, the fulfillment system might defer processing the payment notification until there is an order with which to associate it. In rendezvous scenarios, where messages from different sources drive a workflow forward, the real-time execution order may indeed be correct, but the messages reflecting the outcomes may arrive out of order.

                                                                                                                                                                                                                                                                                                                Ultimately, deferral aids in reordering messages from the arrival order into an order in which they can be processed, while leaving those messages safely in the message store for which processing needs to be postponed.

                                                                                                                                                                                                                                                                                                                func (*QueueSession) ReceiveOne

                                                                                                                                                                                                                                                                                                                func (qs *QueueSession) ReceiveOne(ctx context.Context, handler SessionHandler) error

                                                                                                                                                                                                                                                                                                                  ReceiveOne waits for the lock on a particular session to become available, takes it, then process the session. The session can contain multiple messages. ReceiveOne will receive all messages within that session.

                                                                                                                                                                                                                                                                                                                  Handler must call a disposition action such as Complete, Abandon, Deadletter on the message. If the messages does not have a disposition set, the Queue's DefaultDisposition will be used.

                                                                                                                                                                                                                                                                                                                  If the handler returns an error, the receive loop will be terminated.

                                                                                                                                                                                                                                                                                                                  func (*QueueSession) Send

                                                                                                                                                                                                                                                                                                                  func (qs *QueueSession) Send(ctx context.Context, msg *Message) error

                                                                                                                                                                                                                                                                                                                    Send the message to the queue within a session

                                                                                                                                                                                                                                                                                                                    func (*QueueSession) SessionID

                                                                                                                                                                                                                                                                                                                    func (qs *QueueSession) SessionID() *string

                                                                                                                                                                                                                                                                                                                      SessionID is the identifier for the Service Bus session

                                                                                                                                                                                                                                                                                                                      type ReceiveBuilder

                                                                                                                                                                                                                                                                                                                      type ReceiveBuilder interface {
                                                                                                                                                                                                                                                                                                                      	ReceiverBuilder
                                                                                                                                                                                                                                                                                                                      	// contains filtered or unexported methods
                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                        ReceiveBuilder is a ReceiverBuilder and EntityManagementAddresser

                                                                                                                                                                                                                                                                                                                        type ReceiveMode

                                                                                                                                                                                                                                                                                                                        type ReceiveMode int

                                                                                                                                                                                                                                                                                                                          ReceiveMode represents the behavior when consuming a message from a queue

                                                                                                                                                                                                                                                                                                                          type ReceiveOner

                                                                                                                                                                                                                                                                                                                          type ReceiveOner interface {
                                                                                                                                                                                                                                                                                                                          	Closer
                                                                                                                                                                                                                                                                                                                          	ReceiveOne(ctx context.Context, handler Handler) error
                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                            ReceiveOner provides the ability to receive and handle events

                                                                                                                                                                                                                                                                                                                            type Receiver

                                                                                                                                                                                                                                                                                                                            type Receiver struct {
                                                                                                                                                                                                                                                                                                                            	Name string
                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                            	DefaultDisposition DispositionAction
                                                                                                                                                                                                                                                                                                                            	Closed             bool
                                                                                                                                                                                                                                                                                                                            	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                              Receiver provides connection, session and link handling for a receiving to an entity path

                                                                                                                                                                                                                                                                                                                              func (*Receiver) Close

                                                                                                                                                                                                                                                                                                                              func (r *Receiver) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                Close will close the AMQP session and link of the Receiver

                                                                                                                                                                                                                                                                                                                                func (*Receiver) Listen

                                                                                                                                                                                                                                                                                                                                func (r *Receiver) Listen(ctx context.Context, handler Handler) *ListenerHandle

                                                                                                                                                                                                                                                                                                                                  Listen start a listener for messages sent to the entity path

                                                                                                                                                                                                                                                                                                                                  func (*Receiver) ReceiveOne

                                                                                                                                                                                                                                                                                                                                  func (r *Receiver) ReceiveOne(ctx context.Context, handler Handler) error

                                                                                                                                                                                                                                                                                                                                    ReceiveOne will receive one message from the link

                                                                                                                                                                                                                                                                                                                                    func (*Receiver) Recover

                                                                                                                                                                                                                                                                                                                                    func (r *Receiver) Recover(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                      Recover will attempt to close the current session and link, then rebuild them

                                                                                                                                                                                                                                                                                                                                      type ReceiverBuilder

                                                                                                                                                                                                                                                                                                                                      type ReceiverBuilder interface {
                                                                                                                                                                                                                                                                                                                                      	NewReceiver(ctx context.Context, opts ...ReceiverOption) (*Receiver, error)
                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                        ReceiverBuilder describes the ability of an entity to build receiver links

                                                                                                                                                                                                                                                                                                                                        type ReceiverOption

                                                                                                                                                                                                                                                                                                                                        type ReceiverOption func(receiver *Receiver) error

                                                                                                                                                                                                                                                                                                                                          ReceiverOption provides a structure for configuring receivers

                                                                                                                                                                                                                                                                                                                                          func ReceiverWithPrefetchCount

                                                                                                                                                                                                                                                                                                                                          func ReceiverWithPrefetchCount(prefetch uint32) ReceiverOption

                                                                                                                                                                                                                                                                                                                                            ReceiverWithPrefetchCount configures the receiver to attempt to fetch the number of messages specified by the prefect at one time.

                                                                                                                                                                                                                                                                                                                                            The default is 1 message at a time.

                                                                                                                                                                                                                                                                                                                                            Caution: Using PeekLock, messages have a set lock timeout, which can be renewed. By setting a high prefetch count, a local queue of messages could build up and cause message locks to expire before the message lands in the handler. If this happens, the message disposition will fail and will be re-queued and processed again.

                                                                                                                                                                                                                                                                                                                                            func ReceiverWithReceiveMode

                                                                                                                                                                                                                                                                                                                                            func ReceiverWithReceiveMode(mode ReceiveMode) ReceiverOption

                                                                                                                                                                                                                                                                                                                                              ReceiverWithReceiveMode configures a Receiver to use the specified receive mode

                                                                                                                                                                                                                                                                                                                                              func ReceiverWithSession

                                                                                                                                                                                                                                                                                                                                              func ReceiverWithSession(sessionID *string) ReceiverOption

                                                                                                                                                                                                                                                                                                                                                ReceiverWithSession configures a Receiver to use a session

                                                                                                                                                                                                                                                                                                                                                type RestHandler

                                                                                                                                                                                                                                                                                                                                                type RestHandler func(ctx context.Context, req *http.Request) (*http.Response, error)

                                                                                                                                                                                                                                                                                                                                                  RestHandler is used to transform a request and response within the http pipeline

                                                                                                                                                                                                                                                                                                                                                  type RuleDescription

                                                                                                                                                                                                                                                                                                                                                  type RuleDescription struct {
                                                                                                                                                                                                                                                                                                                                                  	XMLName xml.Name `xml:"RuleDescription"`
                                                                                                                                                                                                                                                                                                                                                  	BaseEntityDescription
                                                                                                                                                                                                                                                                                                                                                  	CreatedAt *date.Time         `xml:"CreatedAt,omitempty"`
                                                                                                                                                                                                                                                                                                                                                  	Filter    FilterDescription  `xml:"Filter"`
                                                                                                                                                                                                                                                                                                                                                  	Action    *ActionDescription `xml:"Action,omitempty"`
                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                    RuleDescription is the content type for Subscription Rule management requests

                                                                                                                                                                                                                                                                                                                                                    type RuleEntity

                                                                                                                                                                                                                                                                                                                                                    type RuleEntity struct {
                                                                                                                                                                                                                                                                                                                                                    	*RuleDescription
                                                                                                                                                                                                                                                                                                                                                    	*Entity
                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                      RuleEntity is the Azure Service Bus description of a Subscription Rule for management activities

                                                                                                                                                                                                                                                                                                                                                      type SQLAction

                                                                                                                                                                                                                                                                                                                                                      type SQLAction struct {
                                                                                                                                                                                                                                                                                                                                                      	Expression string
                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                        SQLAction represents a SQL language-based action expression that is evaluated against a BrokeredMessage. A SQLAction supports a subset of the SQL-92 standard.

                                                                                                                                                                                                                                                                                                                                                        With SQL filter conditions, you can define an action that can annotate the message by adding, removing, or replacing properties and their values. The action uses a SQL-like expression that loosely leans on the SQL UPDATE statement syntax. The action is performed on the message after it has been matched and before the message is selected into the subscription. The changes to the message properties are private to the message copied into the subscription.

                                                                                                                                                                                                                                                                                                                                                        see: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-sql-filter

                                                                                                                                                                                                                                                                                                                                                        func (SQLAction) ToActionDescription

                                                                                                                                                                                                                                                                                                                                                        func (sf SQLAction) ToActionDescription() ActionDescription

                                                                                                                                                                                                                                                                                                                                                          ToActionDescription will transform the SqlAction into a ActionDescription

                                                                                                                                                                                                                                                                                                                                                          type SQLFilter

                                                                                                                                                                                                                                                                                                                                                          type SQLFilter struct {
                                                                                                                                                                                                                                                                                                                                                          	Expression string
                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                            SQLFilter represents a SQL language-based filter expression that is evaluated against a BrokeredMessage. A SQLFilter supports a subset of the SQL-92 standard.

                                                                                                                                                                                                                                                                                                                                                            see: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-sql-filter

                                                                                                                                                                                                                                                                                                                                                            func (SQLFilter) ToFilterDescription

                                                                                                                                                                                                                                                                                                                                                            func (sf SQLFilter) ToFilterDescription() FilterDescription

                                                                                                                                                                                                                                                                                                                                                              ToFilterDescription will transform the SqlFilter into a FilterDescription

                                                                                                                                                                                                                                                                                                                                                              type SendAndReceiveBuilder

                                                                                                                                                                                                                                                                                                                                                              type SendAndReceiveBuilder interface {
                                                                                                                                                                                                                                                                                                                                                              	ReceiveBuilder
                                                                                                                                                                                                                                                                                                                                                              	SenderBuilder
                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                SendAndReceiveBuilder is a ReceiverBuilder, SenderBuilder and EntityManagementAddresser

                                                                                                                                                                                                                                                                                                                                                                type SendOption

                                                                                                                                                                                                                                                                                                                                                                type SendOption func(event *Message) error

                                                                                                                                                                                                                                                                                                                                                                  SendOption provides a way to customize a message on sending

                                                                                                                                                                                                                                                                                                                                                                  type Sender

                                                                                                                                                                                                                                                                                                                                                                  type Sender struct {
                                                                                                                                                                                                                                                                                                                                                                  	Name string
                                                                                                                                                                                                                                                                                                                                                                  	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                    Sender provides connection, session and link handling for an sending to an entity path

                                                                                                                                                                                                                                                                                                                                                                    func (*Sender) Close

                                                                                                                                                                                                                                                                                                                                                                    func (s *Sender) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                                                      Close will close the AMQP connection, session and link of the Sender

                                                                                                                                                                                                                                                                                                                                                                      func (*Sender) Recover

                                                                                                                                                                                                                                                                                                                                                                      func (s *Sender) Recover(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                                                        Recover will attempt to close the current session and link, then rebuild them

                                                                                                                                                                                                                                                                                                                                                                        func (*Sender) Send

                                                                                                                                                                                                                                                                                                                                                                        func (s *Sender) Send(ctx context.Context, msg *Message, opts ...SendOption) error

                                                                                                                                                                                                                                                                                                                                                                          Send will send a message to the entity path with options

                                                                                                                                                                                                                                                                                                                                                                          This will retry sending the message if the server responds with a busy error.

                                                                                                                                                                                                                                                                                                                                                                          func (*Sender) String

                                                                                                                                                                                                                                                                                                                                                                          func (s *Sender) String() string

                                                                                                                                                                                                                                                                                                                                                                          type SenderBuilder

                                                                                                                                                                                                                                                                                                                                                                          type SenderBuilder interface {
                                                                                                                                                                                                                                                                                                                                                                          	NewSender(ctx context.Context, opts ...SenderOption) (*Sender, error)
                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                            SenderBuilder describes the ability of an entity to build sender links

                                                                                                                                                                                                                                                                                                                                                                            type SenderOption

                                                                                                                                                                                                                                                                                                                                                                            type SenderOption func(*Sender) error

                                                                                                                                                                                                                                                                                                                                                                              SenderOption provides a way to customize a Sender

                                                                                                                                                                                                                                                                                                                                                                              func SenderWithSession

                                                                                                                                                                                                                                                                                                                                                                              func SenderWithSession(sessionID *string) SenderOption

                                                                                                                                                                                                                                                                                                                                                                                SenderWithSession configures the message to send with a specific session and sequence. By default, a Sender has a default session (uuid.NewV4()) and sequence generator.

                                                                                                                                                                                                                                                                                                                                                                                type SessionHandler

                                                                                                                                                                                                                                                                                                                                                                                type SessionHandler interface {
                                                                                                                                                                                                                                                                                                                                                                                	Handler
                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                	// Start is called when a Receiver is informed that has acquired a lock on a Service Bus Session.
                                                                                                                                                                                                                                                                                                                                                                                	Start(*MessageSession) error
                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                	// End is called when a Receiver is informed that the last message of a Session has been passed to it.
                                                                                                                                                                                                                                                                                                                                                                                	End()
                                                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                                                                  SessionHandler exposes a manner of handling a group of messages together. Instances of SessionHandler should be passed to a Receiver such as a Queue or Subscription.

                                                                                                                                                                                                                                                                                                                                                                                  func NewSessionHandler

                                                                                                                                                                                                                                                                                                                                                                                  func NewSessionHandler(base Handler, start func(*MessageSession) error, end func()) SessionHandler

                                                                                                                                                                                                                                                                                                                                                                                    NewSessionHandler is a type converter that allows three funcs to be tied together into a type that fulfills the SessionHandler interface.

                                                                                                                                                                                                                                                                                                                                                                                    type Subscription

                                                                                                                                                                                                                                                                                                                                                                                    type Subscription struct {
                                                                                                                                                                                                                                                                                                                                                                                    	Topic *Topic
                                                                                                                                                                                                                                                                                                                                                                                    	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                      Subscription represents a Service Bus Subscription entity which are used to receive topic messages. A topic subscription resembles a virtual queue that receives copies of the messages that are sent to the topic. Messages are received from a subscription identically to the way they are received from a queue.

                                                                                                                                                                                                                                                                                                                                                                                      func (*Subscription) Close

                                                                                                                                                                                                                                                                                                                                                                                      func (s *Subscription) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                                                                        Close the underlying connection to Service Bus

                                                                                                                                                                                                                                                                                                                                                                                        func (*Subscription) NewDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                        func (s *Subscription) NewDeadLetter() *DeadLetter

                                                                                                                                                                                                                                                                                                                                                                                          NewDeadLetter creates an entity that represents the dead letter sub queue of the queue

                                                                                                                                                                                                                                                                                                                                                                                          Azure Service Bus queues and topic subscriptions provide a secondary sub-queue, called a dead-letter queue (DLQ). The dead-letter queue does not need to be explicitly created and cannot be deleted or otherwise managed independent of the main entity.

                                                                                                                                                                                                                                                                                                                                                                                          The purpose of the dead-letter queue is to hold messages that cannot be delivered to any receiver, or messages that could not be processed. Messages can then be removed from the DLQ and inspected. An application might, with help of an operator, correct issues and resubmit the message, log the fact that there was an error, and take corrective action.

                                                                                                                                                                                                                                                                                                                                                                                          From an API and protocol perspective, the DLQ is mostly similar to any other queue, except that messages can only be submitted via the dead-letter operation of the parent entity. In addition, time-to-live is not observed, and you can't dead-letter a message from a DLQ. The dead-letter queue fully supports peek-lock delivery and transactional operations.

                                                                                                                                                                                                                                                                                                                                                                                          Note that there is no automatic cleanup of the DLQ. Messages remain in the DLQ until you explicitly retrieve them from the DLQ and call Complete() on the dead-letter message.

                                                                                                                                                                                                                                                                                                                                                                                          func (*Subscription) NewDeadLetterReceiver

                                                                                                                                                                                                                                                                                                                                                                                          func (s *Subscription) NewDeadLetterReceiver(ctx context.Context, opts ...ReceiverOption) (ReceiveOner, error)

                                                                                                                                                                                                                                                                                                                                                                                            NewDeadLetterReceiver builds a receiver for the Subscriptions's dead letter queue

                                                                                                                                                                                                                                                                                                                                                                                            func (*Subscription) NewReceiver

                                                                                                                                                                                                                                                                                                                                                                                            func (s *Subscription) NewReceiver(ctx context.Context, opts ...ReceiverOption) (*Receiver, error)

                                                                                                                                                                                                                                                                                                                                                                                              NewReceiver will create a new Receiver for receiving messages off of the queue

                                                                                                                                                                                                                                                                                                                                                                                              func (*Subscription) NewSession

                                                                                                                                                                                                                                                                                                                                                                                              func (s *Subscription) NewSession(sessionID *string) *SubscriptionSession

                                                                                                                                                                                                                                                                                                                                                                                                NewSession will create a new session based receiver for the subscription

                                                                                                                                                                                                                                                                                                                                                                                                Microsoft Azure Service Bus sessions enable joint and ordered handling of unbounded sequences of related messages. To realize a FIFO guarantee in Service Bus, use Sessions. Service Bus is not prescriptive about the nature of the relationship between the messages, and also does not define a particular model for determining where a message sequence starts or ends.

                                                                                                                                                                                                                                                                                                                                                                                                func (*Subscription) NewTransferDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                                func (s *Subscription) NewTransferDeadLetter() *TransferDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                                  NewTransferDeadLetter creates an entity that represents the transfer dead letter sub queue of the subscription

                                                                                                                                                                                                                                                                                                                                                                                                  Messages will be sent to the transfer dead-letter queue under the following conditions:

                                                                                                                                                                                                                                                                                                                                                                                                  - A message passes through more than 3 queues or topics that are chained together.
                                                                                                                                                                                                                                                                                                                                                                                                  - The destination queue or topic is disabled or deleted.
                                                                                                                                                                                                                                                                                                                                                                                                  - The destination queue or topic exceeds the maximum entity size.
                                                                                                                                                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                                                                                                                                                  func (*Subscription) NewTransferDeadLetterReceiver

                                                                                                                                                                                                                                                                                                                                                                                                  func (s *Subscription) NewTransferDeadLetterReceiver(ctx context.Context, opts ...ReceiverOption) (ReceiveOner, error)

                                                                                                                                                                                                                                                                                                                                                                                                    NewTransferDeadLetterReceiver builds a receiver for the Queue's transfer dead letter queue

                                                                                                                                                                                                                                                                                                                                                                                                    Messages will be sent to the transfer dead-letter queue under the following conditions:

                                                                                                                                                                                                                                                                                                                                                                                                    - A message passes through more than 3 queues or topics that are chained together.
                                                                                                                                                                                                                                                                                                                                                                                                    - The destination queue or topic is disabled or deleted.
                                                                                                                                                                                                                                                                                                                                                                                                    - The destination queue or topic exceeds the maximum entity size.
                                                                                                                                                                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                                                                                                                                                                                    func (Subscription) Peek

                                                                                                                                                                                                                                                                                                                                                                                                    func (re Subscription) Peek(ctx context.Context, options ...PeekOption) (MessageIterator, error)

                                                                                                                                                                                                                                                                                                                                                                                                      Peek fetches a list of Messages from the Service Bus broker without acquiring a lock or committing to a disposition. The messages are delivered as close to sequence order as possible.

                                                                                                                                                                                                                                                                                                                                                                                                      The MessageIterator that is returned has the following properties: - Messages are fetches from the server in pages. Page size is configurable with PeekOptions. - The MessageIterator will always return "false" for Done(). - When Next() is called, it will return either: a slice of messages and no error, nil with an error related to being unable to complete the operation, or an empty slice of messages and an instance of "ErrNoMessages" signifying that there are currently no messages in the queue with a sequence ID larger than previously viewed ones.

                                                                                                                                                                                                                                                                                                                                                                                                      func (Subscription) PeekOne

                                                                                                                                                                                                                                                                                                                                                                                                      func (re Subscription) PeekOne(ctx context.Context, options ...PeekOption) (*Message, error)

                                                                                                                                                                                                                                                                                                                                                                                                        PeekOne fetches a single Message from the Service Bus broker without acquiring a lock or committing to a disposition.

                                                                                                                                                                                                                                                                                                                                                                                                        func (*Subscription) Receive

                                                                                                                                                                                                                                                                                                                                                                                                        func (s *Subscription) Receive(ctx context.Context, handler Handler) error

                                                                                                                                                                                                                                                                                                                                                                                                          Receive subscribes for messages sent to the Subscription

                                                                                                                                                                                                                                                                                                                                                                                                          Handler must call a disposition action such as Complete, Abandon, Deadletter on the message. If the messages does not have a disposition set, the Queue's DefaultDisposition will be used.

                                                                                                                                                                                                                                                                                                                                                                                                          If the handler returns an error, the receive loop will be terminated.

                                                                                                                                                                                                                                                                                                                                                                                                          func (Subscription) ReceiveDeferred

                                                                                                                                                                                                                                                                                                                                                                                                          func (re Subscription) ReceiveDeferred(ctx context.Context, handler Handler, sequenceNumbers ...int64) error

                                                                                                                                                                                                                                                                                                                                                                                                            ReceiveDeferred will receive and handle a set of deferred messages

                                                                                                                                                                                                                                                                                                                                                                                                            When a queue or subscription client receives a message that it is willing to process, but for which processing is not currently possible due to special circumstances inside of the application, it has the option of "deferring" retrieval of the message to a later point. The message remains in the queue or subscription, but it is set aside.

                                                                                                                                                                                                                                                                                                                                                                                                            Deferral is a feature specifically created for workflow processing scenarios. Workflow frameworks may require certain operations to be processed in a particular order, and may have to postpone processing of some received messages until prescribed prior work that is informed by other messages has been completed.

                                                                                                                                                                                                                                                                                                                                                                                                            A simple illustrative example is an order processing sequence in which a payment notification from an external payment provider appears in a system before the matching purchase order has been propagated from the store front to the fulfillment system. In that case, the fulfillment system might defer processing the payment notification until there is an order with which to associate it. In rendezvous scenarios, where messages from different sources drive a workflow forward, the real-time execution order may indeed be correct, but the messages reflecting the outcomes may arrive out of order.

                                                                                                                                                                                                                                                                                                                                                                                                            Ultimately, deferral aids in reordering messages from the arrival order into an order in which they can be processed, while leaving those messages safely in the message store for which processing needs to be postponed.

                                                                                                                                                                                                                                                                                                                                                                                                            func (Subscription) ReceiveDeferredWithMode

                                                                                                                                                                                                                                                                                                                                                                                                            func (re Subscription) ReceiveDeferredWithMode(ctx context.Context, handler Handler, mode ReceiveMode, sequenceNumbers ...int64) error

                                                                                                                                                                                                                                                                                                                                                                                                              ReceiveDeferredWithMode will receive and handle a set of deferred messages

                                                                                                                                                                                                                                                                                                                                                                                                              When a queue or subscription client receives a message that it is willing to process, but for which processing is not currently possible due to special circumstances inside of the application, it has the option of "deferring" retrieval of the message to a later point. The message remains in the queue or subscription, but it is set aside.

                                                                                                                                                                                                                                                                                                                                                                                                              Deferral is a feature specifically created for workflow processing scenarios. Workflow frameworks may require certain operations to be processed in a particular order, and may have to postpone processing of some received messages until prescribed prior work that is informed by other messages has been completed.

                                                                                                                                                                                                                                                                                                                                                                                                              A simple illustrative example is an order processing sequence in which a payment notification from an external payment provider appears in a system before the matching purchase order has been propagated from the store front to the fulfillment system. In that case, the fulfillment system might defer processing the payment notification until there is an order with which to associate it. In rendezvous scenarios, where messages from different sources drive a workflow forward, the real-time execution order may indeed be correct, but the messages reflecting the outcomes may arrive out of order.

                                                                                                                                                                                                                                                                                                                                                                                                              Ultimately, deferral aids in reordering messages from the arrival order into an order in which they can be processed, while leaving those messages safely in the message store for which processing needs to be postponed.

                                                                                                                                                                                                                                                                                                                                                                                                              func (*Subscription) ReceiveOne

                                                                                                                                                                                                                                                                                                                                                                                                              func (s *Subscription) ReceiveOne(ctx context.Context, handler Handler) error

                                                                                                                                                                                                                                                                                                                                                                                                                ReceiveOne will listen to receive a single message. ReceiveOne will only wait as long as the context allows.

                                                                                                                                                                                                                                                                                                                                                                                                                Handler must call a disposition action such as Complete, Abandon, Deadletter on the message. If the messages does not have a disposition set, the Queue's DefaultDisposition will be used.

                                                                                                                                                                                                                                                                                                                                                                                                                func (Subscription) RenewLocks

                                                                                                                                                                                                                                                                                                                                                                                                                func (re Subscription) RenewLocks(ctx context.Context, messages ...*Message) error

                                                                                                                                                                                                                                                                                                                                                                                                                  RenewLocks renews the locks on messages provided

                                                                                                                                                                                                                                                                                                                                                                                                                  func (Subscription) SendBatchDisposition

                                                                                                                                                                                                                                                                                                                                                                                                                  func (re Subscription) SendBatchDisposition(ctx context.Context, iterator BatchDispositionIterator) error

                                                                                                                                                                                                                                                                                                                                                                                                                    SendBatchDisposition updates the LockTokenIDs to the disposition status.

                                                                                                                                                                                                                                                                                                                                                                                                                    type SubscriptionDescription

                                                                                                                                                                                                                                                                                                                                                                                                                    type SubscriptionDescription struct {
                                                                                                                                                                                                                                                                                                                                                                                                                    	XMLName xml.Name `xml:"SubscriptionDescription"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	BaseEntityDescription
                                                                                                                                                                                                                                                                                                                                                                                                                    	LockDuration                              *string                 `xml:"LockDuration,omitempty"` // LockDuration - ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.
                                                                                                                                                                                                                                                                                                                                                                                                                    	RequiresSession                           *bool                   `xml:"RequiresSession,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	DefaultMessageTimeToLive                  *string                 `xml:"DefaultMessageTimeToLive,omitempty"` // DefaultMessageTimeToLive - ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
                                                                                                                                                                                                                                                                                                                                                                                                                    	DefaultRuleDescription                    *DefaultRuleDescription `xml:"DefaultRuleDescription,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	DeadLetteringOnMessageExpiration          *bool                   `xml:"DeadLetteringOnMessageExpiration,omitempty"` // DeadLetteringOnMessageExpiration - A value that indicates whether this queue has dead letter support when a message expires.
                                                                                                                                                                                                                                                                                                                                                                                                                    	DeadLetteringOnFilterEvaluationExceptions *bool                   `xml:"DeadLetteringOnFilterEvaluationExceptions,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	MessageCount                              *int64                  `xml:"MessageCount,omitempty"`            // MessageCount - The number of messages in the queue.
                                                                                                                                                                                                                                                                                                                                                                                                                    	MaxDeliveryCount                          *int32                  `xml:"MaxDeliveryCount,omitempty"`        // MaxDeliveryCount - The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10.
                                                                                                                                                                                                                                                                                                                                                                                                                    	EnableBatchedOperations                   *bool                   `xml:"EnableBatchedOperations,omitempty"` // EnableBatchedOperations - Value that indicates whether server-side batched operations are enabled.
                                                                                                                                                                                                                                                                                                                                                                                                                    	Status                                    *EntityStatus           `xml:"Status,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	CreatedAt                                 *date.Time              `xml:"CreatedAt,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	UpdatedAt                                 *date.Time              `xml:"UpdatedAt,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	AccessedAt                                *date.Time              `xml:"AccessedAt,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	AutoDeleteOnIdle                          *string                 `xml:"AutoDeleteOnIdle,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    	ForwardTo                                 *string                 `xml:"ForwardTo,omitempty"`                     // ForwardTo - absolute URI of the entity to forward messages
                                                                                                                                                                                                                                                                                                                                                                                                                    	ForwardDeadLetteredMessagesTo             *string                 `xml:"ForwardDeadLetteredMessagesTo,omitempty"` // ForwardDeadLetteredMessagesTo - absolute URI of the entity to forward dead letter messages
                                                                                                                                                                                                                                                                                                                                                                                                                    	CountDetails                              *CountDetails           `xml:"CountDetails,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                                                      SubscriptionDescription is the content type for Subscription management requests

                                                                                                                                                                                                                                                                                                                                                                                                                      type SubscriptionEntity

                                                                                                                                                                                                                                                                                                                                                                                                                      type SubscriptionEntity struct {
                                                                                                                                                                                                                                                                                                                                                                                                                      	*SubscriptionDescription
                                                                                                                                                                                                                                                                                                                                                                                                                      	*Entity
                                                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                                                        SubscriptionEntity is the Azure Service Bus description of a topic Subscription for management activities

                                                                                                                                                                                                                                                                                                                                                                                                                        type SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                        type SubscriptionManagementOption func(*SubscriptionDescription) error

                                                                                                                                                                                                                                                                                                                                                                                                                          SubscriptionManagementOption represents named options for assisting Subscription creation

                                                                                                                                                                                                                                                                                                                                                                                                                          func SubscriptionWithAutoDeleteOnIdle

                                                                                                                                                                                                                                                                                                                                                                                                                          func SubscriptionWithAutoDeleteOnIdle(window *time.Duration) SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                            SubscriptionWithAutoDeleteOnIdle configures the subscription to automatically delete after the specified idle interval. The minimum duration is 5 minutes.

                                                                                                                                                                                                                                                                                                                                                                                                                            func SubscriptionWithAutoForward

                                                                                                                                                                                                                                                                                                                                                                                                                            func SubscriptionWithAutoForward(target Targetable) SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                              SubscriptionWithAutoForward configures the queue to automatically forward messages to the specified entity path

                                                                                                                                                                                                                                                                                                                                                                                                                              The ability to AutoForward to a target requires the connection have management authorization. If the connection string or Azure Active Directory identity used does not have management authorization, an unauthorized error will be returned on the PUT.

                                                                                                                                                                                                                                                                                                                                                                                                                              func SubscriptionWithBatchedOperations

                                                                                                                                                                                                                                                                                                                                                                                                                              func SubscriptionWithBatchedOperations() SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                SubscriptionWithBatchedOperations configures the subscription to batch server-side operations.

                                                                                                                                                                                                                                                                                                                                                                                                                                func SubscriptionWithDeadLetteringOnMessageExpiration

                                                                                                                                                                                                                                                                                                                                                                                                                                func SubscriptionWithDeadLetteringOnMessageExpiration() SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                  SubscriptionWithDeadLetteringOnMessageExpiration will ensure the Subscription sends expired messages to the dead letter queue

                                                                                                                                                                                                                                                                                                                                                                                                                                  func SubscriptionWithDefaultRuleDescription

                                                                                                                                                                                                                                                                                                                                                                                                                                  func SubscriptionWithDefaultRuleDescription(filter FilterDescriber, name string) SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                    SubscriptionWithDefaultRuleDescription configures the subscription to set a default rule

                                                                                                                                                                                                                                                                                                                                                                                                                                    func SubscriptionWithForwardDeadLetteredMessagesTo

                                                                                                                                                                                                                                                                                                                                                                                                                                    func SubscriptionWithForwardDeadLetteredMessagesTo(target Targetable) SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                      SubscriptionWithForwardDeadLetteredMessagesTo configures the queue to automatically forward dead letter messages to the specified target entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                      The ability to forward dead letter messages to a target requires the connection have management authorization. If the connection string or Azure Active Directory identity used does not have management authorization, an unauthorized error will be returned on the PUT.

                                                                                                                                                                                                                                                                                                                                                                                                                                      func SubscriptionWithLockDuration

                                                                                                                                                                                                                                                                                                                                                                                                                                      func SubscriptionWithLockDuration(window *time.Duration) SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                        SubscriptionWithLockDuration configures the subscription to have a duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute.

                                                                                                                                                                                                                                                                                                                                                                                                                                        func SubscriptionWithMessageTimeToLive

                                                                                                                                                                                                                                                                                                                                                                                                                                        func SubscriptionWithMessageTimeToLive(window *time.Duration) SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                          SubscriptionWithMessageTimeToLive configures the subscription to set a time to live on messages. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. If nil, defaults to 14 days.

                                                                                                                                                                                                                                                                                                                                                                                                                                          func SubscriptionWithRequiredSessions

                                                                                                                                                                                                                                                                                                                                                                                                                                          func SubscriptionWithRequiredSessions() SubscriptionManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                            SubscriptionWithRequiredSessions will ensure the subscription requires senders and receivers to have sessionIDs

                                                                                                                                                                                                                                                                                                                                                                                                                                            type SubscriptionManager

                                                                                                                                                                                                                                                                                                                                                                                                                                            type SubscriptionManager struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                            	Topic *Topic
                                                                                                                                                                                                                                                                                                                                                                                                                                            	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                                              SubscriptionManager provides CRUD functionality for Service Bus Subscription

                                                                                                                                                                                                                                                                                                                                                                                                                                              func (*SubscriptionManager) Delete

                                                                                                                                                                                                                                                                                                                                                                                                                                              func (sm *SubscriptionManager) Delete(ctx context.Context, name string) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                Delete deletes a Service Bus Topic entity by name

                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*SubscriptionManager) DeleteRule

                                                                                                                                                                                                                                                                                                                                                                                                                                                func (sm *SubscriptionManager) DeleteRule(ctx context.Context, subscriptionName, ruleName string) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                  DeleteRule will delete a rule on the subscription

                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (SubscriptionManager) Execute

                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (em SubscriptionManager) Execute(ctx context.Context, method string, entityPath string, body io.Reader, mw ...MiddlewareFunc) (*http.Response, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*SubscriptionManager) Get

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Get fetches a Service Bus Topic entity by name

                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (*SubscriptionManager) List

                                                                                                                                                                                                                                                                                                                                                                                                                                                      List fetches all of the Topics for a Service Bus Namespace

                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (*SubscriptionManager) ListRules

                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (sm *SubscriptionManager) ListRules(ctx context.Context, subscriptionName string) ([]*RuleEntity, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                        ListRules returns the slice of subscription filter rules

                                                                                                                                                                                                                                                                                                                                                                                                                                                        By default when the subscription is created, there exists a single "true" filter which matches all messages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (SubscriptionManager) Post

                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (em SubscriptionManager) Post(ctx context.Context, entityPath string, body []byte, mw ...MiddlewareFunc) (*http.Response, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Post performs an HTTP POST for a given entity path and body

                                                                                                                                                                                                                                                                                                                                                                                                                                                          func (*SubscriptionManager) Put

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Put creates or updates a Service Bus Topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (*SubscriptionManager) PutRule

                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (sm *SubscriptionManager) PutRule(ctx context.Context, subscriptionName, ruleName string, filter FilterDescriber) (*RuleEntity, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                              PutRule creates a new Subscription rule to filter messages from the topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (*SubscriptionManager) PutRuleWithAction

                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (sm *SubscriptionManager) PutRuleWithAction(ctx context.Context, subscriptionName, ruleName string, filter FilterDescriber, action ActionDescriber) (*RuleEntity, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                PutRuleWithAction creates a new Subscription rule to filter messages from the topic and then perform an action

                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (SubscriptionManager) TokenProvider

                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (em SubscriptionManager) TokenProvider() auth.TokenProvider

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TokenProvider generates authorization tokens for communicating with the Service Bus management API

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (SubscriptionManager) Use

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (em SubscriptionManager) Use(mw ...MiddlewareFunc)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Use adds middleware to the middleware mwStack

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type SubscriptionOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type SubscriptionOption func(*Subscription) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SubscriptionOption configures the Subscription Azure Service Bus client

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func SubscriptionWithPrefetchCount

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func SubscriptionWithPrefetchCount(prefetch uint32) SubscriptionOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SubscriptionWithPrefetchCount configures the subscription to attempt to fetch the number of messages specified by the prefetch count at one time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The default is 1 message at a time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Caution: Using PeekLock, messages have a set lock timeout, which can be renewed. By setting a high prefetch count, a local queue of messages could build up and cause message locks to expire before the message lands in the handler. If this happens, the message disposition will fail and will be re-queued and processed again.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func SubscriptionWithReceiveAndDelete

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func SubscriptionWithReceiveAndDelete() SubscriptionOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          SubscriptionWithReceiveAndDelete configures a subscription to pop and delete messages off of the queue upon receiving the message. This differs from the default, PeekLock, where PeekLock receives a message, locks it for a period of time, then sends a disposition to the broker when the message has been processed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type SubscriptionSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type SubscriptionSession struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SubscriptionSession wraps Service Bus session functionality over a Subscription

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func NewSubscriptionSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func NewSubscriptionSession(builder ReceiveBuilder, sessionID *string) *SubscriptionSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NewSubscriptionSession creates a new session receiver to receive from a Service Bus subscription.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Microsoft Azure Service Bus sessions enable joint and ordered handling of unbounded sequences of related messages. To realize a FIFO guarantee in Service Bus, use Sessions. Service Bus is not prescriptive about the nature of the relationship between the messages, and also does not define a particular model for determining where a message sequence starts or ends.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (*SubscriptionSession) Close

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (ss *SubscriptionSession) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Close the underlying connection to Service Bus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*SubscriptionSession) ManagementPath

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (ss *SubscriptionSession) ManagementPath() string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ManagementPath provides an addressable path to the Entity management endpoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*SubscriptionSession) ReceiveDeferred

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (ss *SubscriptionSession) ReceiveDeferred(ctx context.Context, handler Handler, mode ReceiveMode, sequenceNumbers ...int64) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ReceiveDeferred will receive and handle a set of deferred messages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    When a queue or subscription client receives a message that it is willing to process, but for which processing is not currently possible due to special circumstances inside of the application, it has the option of "deferring" retrieval of the message to a later point. The message remains in the queue or subscription, but it is set aside.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Deferral is a feature specifically created for workflow processing scenarios. Workflow frameworks may require certain operations to be processed in a particular order, and may have to postpone processing of some received messages until prescribed prior work that is informed by other messages has been completed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    A simple illustrative example is an order processing sequence in which a payment notification from an external payment provider appears in a system before the matching purchase order has been propagated from the store front to the fulfillment system. In that case, the fulfillment system might defer processing the payment notification until there is an order with which to associate it. In rendezvous scenarios, where messages from different sources drive a workflow forward, the real-time execution order may indeed be correct, but the messages reflecting the outcomes may arrive out of order.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Ultimately, deferral aids in reordering messages from the arrival order into an order in which they can be processed, while leaving those messages safely in the message store for which processing needs to be postponed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (*SubscriptionSession) ReceiveOne

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (ss *SubscriptionSession) ReceiveOne(ctx context.Context, handler SessionHandler) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ReceiveOne waits for the lock on a particular session to become available, takes it, then process the session. The session can contain multiple messages. ReceiveOneSession will receive all messages within that session.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Handler must call a disposition action such as Complete, Abandon, Deadletter on the message. If the messages does not have a disposition set, the Queue's DefaultDisposition will be used.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      If the handler returns an error, the receive loop will be terminated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (*SubscriptionSession) SessionID

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (ss *SubscriptionSession) SessionID() *string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SessionID is the identifier for the Service Bus session

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type SystemProperties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type SystemProperties struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	LockedUntil            *time.Time             `mapstructure:"x-opt-locked-until"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	SequenceNumber         *int64                 `mapstructure:"x-opt-sequence-number"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	PartitionID            *int16                 `mapstructure:"x-opt-partition-id"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	PartitionKey           *string                `mapstructure:"x-opt-partition-key"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	EnqueuedTime           *time.Time             `mapstructure:"x-opt-enqueued-time"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	DeadLetterSource       *string                `mapstructure:"x-opt-deadletter-source"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	ScheduledEnqueueTime   *time.Time             `mapstructure:"x-opt-scheduled-enqueue-time"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	EnqueuedSequenceNumber *int64                 `mapstructure:"x-opt-enqueue-sequence-number"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	ViaPartitionKey        *string                `mapstructure:"x-opt-via-partition-key"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        	Annotations            map[string]interface{} `mapstructure:"-"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          SystemProperties are used to store properties that are set by the system.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Targetable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Targetable interface {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          	TargetURI() string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Targetable provides the ability to forward messages to the entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type Topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type Topic struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Topic in contrast to queues, in which each message is processed by a single consumer, topics and subscriptions provide a one-to-many form of communication, in a publish/subscribe pattern. Useful for scaling to very large numbers of recipients, each published message is made available to each subscription registered with the topic. Messages are sent to a topic and delivered to one or more associated subscriptions, depending on filter rules that can be set on a per-subscription basis. The subscriptions can use additional filters to restrict the messages that they want to receive. Messages are sent to a topic in the same way they are sent to a queue, but messages are not received from the topic directly. Instead, they are received from subscriptions. A topic subscription resembles a virtual queue that receives copies of the messages that are sent to the topic. Messages are received from a subscription identically to the way they are received from a queue.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (Topic) CancelScheduled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (se Topic) CancelScheduled(ctx context.Context, seq ...int64) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                CancelScheduled allows for removal of messages that have been handed to the Service Bus broker for later delivery, but have not yet ben enqueued.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*Topic) Close

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (t *Topic) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Close the underlying connection to Service Bus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*Topic) NewSender

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (t *Topic) NewSender(ctx context.Context, opts ...SenderOption) (*Sender, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NewSender will create a new Sender for sending messages to the queue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (*Topic) NewSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (t *Topic) NewSession(sessionID *string) *TopicSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NewSession will create a new session based sender for the topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Microsoft Azure Service Bus sessions enable joint and ordered handling of unbounded sequences of related messages. To realize a FIFO guarantee in Service Bus, use Sessions. Service Bus is not prescriptive about the nature of the relationship between the messages, and also does not define a particular model for determining where a message sequence starts or ends.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (*Topic) NewSubscription

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (t *Topic) NewSubscription(name string, opts ...SubscriptionOption) (*Subscription, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NewSubscription creates a new Topic Subscription client

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (*Topic) NewSubscriptionManager

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (t *Topic) NewSubscriptionManager() *SubscriptionManager

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NewSubscriptionManager creates a new SubscriptionManager for a Service Bus Topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          func (*Topic) NewTransferDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          func (t *Topic) NewTransferDeadLetter() *TransferDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NewTransferDeadLetter creates an entity that represents the transfer dead letter sub queue of the topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Messages will be sent to the transfer dead-letter queue under the following conditions:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - A message passes through more than 3 queues or topics that are chained together.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - The destination queue or topic is disabled or deleted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - The destination queue or topic exceeds the maximum entity size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (*Topic) NewTransferDeadLetterReceiver

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (t *Topic) NewTransferDeadLetterReceiver(ctx context.Context, opts ...ReceiverOption) (ReceiveOner, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NewTransferDeadLetterReceiver builds a receiver for the Queue's transfer dead letter queue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Messages will be sent to the transfer dead-letter queue under the following conditions:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - A message passes through more than 3 queues or topics that are chained together.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - The destination queue or topic is disabled or deleted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              - The destination queue or topic exceeds the maximum entity size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (Topic) ScheduleAt

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (se Topic) ScheduleAt(ctx context.Context, enqueueTime time.Time, messages ...*Message) ([]int64, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ScheduleAt will send a batch of messages to a Queue, schedule them to be enqueued, and return the sequence numbers that can be used to cancel each message.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*Topic) Send

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (t *Topic) Send(ctx context.Context, event *Message, opts ...SendOption) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Send sends messages to the Topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*Topic) SendBatch

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (t *Topic) SendBatch(ctx context.Context, iterator BatchIterator) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    SendBatch sends a batch of messages to the Topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type TopicDescription

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type TopicDescription struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	XMLName xml.Name `xml:"TopicDescription"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	BaseEntityDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	DefaultMessageTimeToLive            *string       `xml:"DefaultMessageTimeToLive,omitempty"`            // DefaultMessageTimeToLive - ISO 8601 default message time span to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	MaxSizeInMegabytes                  *int32        `xml:"MaxSizeInMegabytes,omitempty"`                  // MaxSizeInMegabytes - The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	RequiresDuplicateDetection          *bool         `xml:"RequiresDuplicateDetection,omitempty"`          // RequiresDuplicateDetection - A value indicating if this queue requires duplicate detection.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	DuplicateDetectionHistoryTimeWindow *string       `xml:"DuplicateDetectionHistoryTimeWindow,omitempty"` // DuplicateDetectionHistoryTimeWindow - ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	EnableBatchedOperations             *bool         `xml:"EnableBatchedOperations,omitempty"`             // EnableBatchedOperations - Value that indicates whether server-side batched operations are enabled.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	SizeInBytes                         *int64        `xml:"SizeInBytes,omitempty"`                         // SizeInBytes - The size of the queue, in bytes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	FilteringMessagesBeforePublishing   *bool         `xml:"FilteringMessagesBeforePublishing,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	IsAnonymousAccessible               *bool         `xml:"IsAnonymousAccessible,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	Status                              *EntityStatus `xml:"Status,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	CreatedAt                           *date.Time    `xml:"CreatedAt,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	UpdatedAt                           *date.Time    `xml:"UpdatedAt,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	SupportOrdering                     *bool         `xml:"SupportOrdering,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	AutoDeleteOnIdle                    *string       `xml:"AutoDeleteOnIdle,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	EnablePartitioning                  *bool         `xml:"EnablePartitioning,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	EnableSubscriptionPartitioning      *bool         `xml:"EnableSubscriptionPartitioning,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	EnableExpress                       *bool         `xml:"EnableExpress,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    	CountDetails                        *CountDetails `xml:"CountDetails,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TopicDescription is the content type for Topic management requests

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type TopicEntity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type TopicEntity struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      	*TopicDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      	*Entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        TopicEntity is the Azure Service Bus description of a Topic for management activities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type TopicManagementOption func(*TopicDescription) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TopicManagementOption represents named options for assisting Topic creation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          func TopicWithAutoDeleteOnIdle

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          func TopicWithAutoDeleteOnIdle(window *time.Duration) TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TopicWithAutoDeleteOnIdle configures the topic to automatically delete after the specified idle interval. The minimum duration is 5 minutes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func TopicWithBatchedOperations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func TopicWithBatchedOperations() TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              TopicWithBatchedOperations configures the topic to batch server-side operations.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func TopicWithDuplicateDetection

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func TopicWithDuplicateDetection(window *time.Duration) TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                TopicWithDuplicateDetection configures the topic to detect duplicates for a given time window. If window is not specified, then it uses the default of 10 minutes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func TopicWithExpress

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func TopicWithExpress() TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TopicWithExpress configures the topic to hold a message in memory temporarily before writing it to persistent storage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func TopicWithMaxSizeInMegabytes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func TopicWithMaxSizeInMegabytes(size int) TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TopicWithMaxSizeInMegabytes configures the maximum size of the topic in megabytes (1 * 1024 - 5 * 1024), which is the size of the memory allocated for the topic. Default is 1 MB (1 * 1024).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    size must be between 1024 and 5 * 1024 for the Standard sku and up to 80 * 1024 for Premium sku

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func TopicWithMessageTimeToLive

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func TopicWithMessageTimeToLive(window *time.Duration) TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TopicWithMessageTimeToLive configures the topic to set a time to live on messages. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. If nil, defaults to 14 days.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func TopicWithOrdering

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func TopicWithOrdering() TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        TopicWithOrdering configures the topic to support ordering of messages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func TopicWithPartitioning

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func TopicWithPartitioning() TopicManagementOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TopicWithPartitioning configures the topic to be partitioned across multiple message brokers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type TopicManager

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type TopicManager struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TopicManager provides CRUD functionality for Service Bus Topics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (*TopicManager) Delete

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (tm *TopicManager) Delete(ctx context.Context, name string) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Delete deletes a Service Bus Topic entity by name

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (TopicManager) Execute

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (em TopicManager) Execute(ctx context.Context, method string, entityPath string, body io.Reader, mw ...MiddlewareFunc) (*http.Response, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (*TopicManager) Get

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func (tm *TopicManager) Get(ctx context.Context, name string) (*TopicEntity, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Get fetches a Service Bus Topic entity by name

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*TopicManager) List

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (tm *TopicManager) List(ctx context.Context) ([]*TopicEntity, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  List fetches all of the Topics for a Service Bus Namespace

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (TopicManager) Post

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (em TopicManager) Post(ctx context.Context, entityPath string, body []byte, mw ...MiddlewareFunc) (*http.Response, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Post performs an HTTP POST for a given entity path and body

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (*TopicManager) Put

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (tm *TopicManager) Put(ctx context.Context, name string, opts ...TopicManagementOption) (*TopicEntity, error)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Put creates or updates a Service Bus Topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (TopicManager) TokenProvider

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      func (em TopicManager) TokenProvider() auth.TokenProvider

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        TokenProvider generates authorization tokens for communicating with the Service Bus management API

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (TopicManager) Use

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func (em TopicManager) Use(mw ...MiddlewareFunc)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Use adds middleware to the middleware mwStack

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type TopicOption

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type TopicOption func(*Topic) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TopicOption represents named options for assisting Topic message handling

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type TopicSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type TopicSession struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              TopicSession wraps Service Bus session functionality over a Topic

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func NewTopicSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              func NewTopicSession(builder SenderBuilder, sessionID *string) *TopicSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NewTopicSession creates a new session receiver to receive from a Service Bus topic.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Microsoft Azure Service Bus sessions enable joint and ordered handling of unbounded sequences of related messages. To realize a FIFO guarantee in Service Bus, use Sessions. Service Bus is not prescriptive about the nature of the relationship between the messages, and also does not define a particular model for determining where a message sequence starts or ends.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (*TopicSession) Close

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                func (ts *TopicSession) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Close the underlying connection to Service Bus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (*TopicSession) Send

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (ts *TopicSession) Send(ctx context.Context, msg *Message) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Send the message to the queue within a session

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (*TopicSession) SessionID

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    func (ts *TopicSession) SessionID() *string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      SessionID is the identifier for the Service Bus session

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type TransferDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type TransferDeadLetter struct {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      	// contains filtered or unexported fields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        TransferDeadLetter represents a transfer dead letter queue in Azure Service Bus.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Messages will be sent to the transfer dead-letter queue under the following conditions:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - A message passes through more than 3 queues or topics that are chained together.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - The destination queue or topic is disabled or deleted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - The destination queue or topic exceeds the maximum entity size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func NewTransferDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        func NewTransferDeadLetter(builder TransferDeadLetterBuilder) *TransferDeadLetter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NewTransferDeadLetter constructs an instance of DeadLetter which represents a transfer dead letter queue in Azure Service Bus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          func (*TransferDeadLetter) Close

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          func (dl *TransferDeadLetter) Close(ctx context.Context) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Close the underlying connection to Service Bus

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (*TransferDeadLetter) ReceiveOne

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            func (dl *TransferDeadLetter) ReceiveOne(ctx context.Context, handler Handler) error

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ReceiveOne will receive one message from the dead letter queue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type TransferDeadLetterBuilder

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type TransferDeadLetterBuilder interface {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              	NewTransferDeadLetterReceiver(ctx context.Context, opts ...ReceiverOption) (ReceiveOner, error)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                TransferDeadLetterBuilder provides the ability to create a new receiver addressed to a given entity's transfer dead letter queue.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type TrueFilter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type TrueFilter struct{}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TrueFilter represents a always true sql expression which will accept all messages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (TrueFilter) ToFilterDescription

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  func (tf TrueFilter) ToFilterDescription() FilterDescription

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ToFilterDescription will transform the TrueFilter into a FilterDescription

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Directories

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Path Synopsis
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    internal