MCPcopy Create free account
hub / github.com/google/go-cloud / OpenSubscription

Function OpenSubscription

pubsub/rabbitpubsub/rabbit.go:579–581  ·  view source on GitHub ↗

OpenSubscription returns a *pubsub.Subscription corresponding to the named queue. See the package documentation for an example. The queue must have been previously created (for instance, by using amqp.Channel.QueueDeclare) and bound to an exchange. OpenSubscription uses the supplied amqp.Connectio

(conn *amqp.Connection, name string, opts *SubscriptionOptions)

Source from the content-addressed store, hash-verified

577// The documentation of the amqp package recommends using separate connections for
578// publishing and subscribing.
579func OpenSubscription(conn *amqp.Connection, name string, opts *SubscriptionOptions) *pubsub.Subscription {
580 return pubsub.NewSubscription(newSubscription(&connection{conn}, name, opts), nil, nil)
581}
582
583type subscription struct {
584 conn amqpConnection

Callers 3

ExampleOpenSubscriptionFunction · 0.92
TestOpensFunction · 0.70
OpenSubscriptionURLMethod · 0.70

Calls 1

newSubscriptionFunction · 0.70

Tested by 2

ExampleOpenSubscriptionFunction · 0.74
TestOpensFunction · 0.56