Destination represents a message destination on a broker. Some examples of destinations include queues and topics. Destination implementations can be retrieved by the various helper functions, such as TopicOf, QueueDurableExclusive, and TopicSubscriptionOf.
type Destination interface { // GetName retrieves the name of the destination GetName() string }
Queue represents a queue used for guaranteed messaging receivers.
type Queue struct {
// contains filtered or unexported fields
}
func QueueDurableExclusive(queueName string) *Queue
QueueDurableExclusive creates a new durable, exclusive queue with the specified name.
func QueueDurableNonExclusive(queueName string) *Queue
QueueDurableNonExclusive creates a durable, non-exclusive queue with the specified name.
func QueueNonDurableExclusive(queueName string) *Queue
QueueNonDurableExclusive creates an exclusive, non-durable queue with the specified name.
func QueueNonDurableExclusiveAnonymous() *Queue
QueueNonDurableExclusiveAnonymous creates an anonymous, exclusive, and non-durable queue.
func (q *Queue) GetName() string
GetName returns the name of the queue. Implements the Destination interface.
func (q *Queue) IsDurable() bool
IsDurable determines if the Queue is durable. Durable queues are privisioned objects on the broker that have a lifespan that is independent of any one client session.
func (q *Queue) IsExclusivelyAccessible() bool
IsExclusivelyAccessible determines if Queue supports exclusive or shared-access mode. Returns true if the Queue can serve only one consumer at any one time, false if the Queue can serve multiple consumers with each consumer serviced in a round-robin fashion.
func (q *Queue) String() string
ShareName is an interface for identifiers that are associated with a shared subscription. See https://docs.solace.com/PubSub-Basics/Direct-Messages.htm#Shared in the Solace documentation.
type ShareName struct {
// contains filtered or unexported fields
}
func ShareNameOf(name string) *ShareName
ShareNameOf returns a new share name with the provided name. Valid share names are not empty and do not contain special characters '>' or '*'. Returns a new ShareName with the given string.
func (sn *ShareName) GetName() string
GetName returns the share name. Implements the Destination interface.
func (sn *ShareName) String() string
String implements fmt.Stringer
Subscription represents the valid subscriptions that can be specified to receivers. Valid subscriptions include *resource.TopicSubscription.
type Subscription interface { Destination // GetSubscriptionType will return the type of the subscription as a string GetSubscriptionType() string }
Topic is an implementation of destination representing a topic that can be published to.
type Topic struct {
// contains filtered or unexported fields
}
func TopicOf(expression string) *Topic
TopicOf creates a new topic with the specified name. Topic name must not be empty.
func (t *Topic) GetName() string
GetName returns the name of the topic. Implements the Destination interface.
func (t *Topic) String() string
String implements fmt.Stringer
TopicSubscription is a subscription to a topic often used for receivers.
type TopicSubscription struct {
// contains filtered or unexported fields
}
func TopicSubscriptionOf(topic string) *TopicSubscription
TopicSubscriptionOf creates a TopicSubscription of the specified topic string.
func (t *TopicSubscription) GetName() string
GetName returns the topic subscription expression. Implements the Destination interface.
func (t *TopicSubscription) GetSubscriptionType() string
GetSubscriptionType returns the type of the topic subscription as a string
func (t *TopicSubscription) String() string
String implements fmt.Stringer