OpenTopic returns a *pubsub.Topic corresponding to the named exchange. See the package documentation for an example. The exchange should already exist (for instance, by using amqp.Channel.ExchangeDeclare), although this won't be checked until the first call to SendBatch. For the Go CDK Pub/Sub mode
(conn *amqp.Connection, name string, opts *TopicOptions)
| 204 | // The documentation of the amqp package recommends using separate connections for |
| 205 | // publishing and subscribing. |
| 206 | func OpenTopic(conn *amqp.Connection, name string, opts *TopicOptions) *pubsub.Topic { |
| 207 | return pubsub.NewTopic(newTopic(&connection{conn}, name, opts), nil) |
| 208 | } |
| 209 | |
| 210 | func newTopic(conn amqpConnection, name string, opts *TopicOptions) *topic { |
| 211 | if opts == nil { |