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