December 2017
Intermediate to advanced
404 pages
9h 28m
English
Before diving back into the MyEvents microservice architecture, let's take a look at the basic AMQP methods that we can use. For this, we will start by building a small example program that is capable of publishing messages to an exchange.
After opening a channel, a message publisher should declare the exchange into which it intends to publish messages. For this, you can use the ExchangeDeclare() method on the channel object:
err = channel.ExchangeDeclare("events", "topic", true, false, false, false, nil)
if err != nil {
panic(err)
}
As you can see, ExchangeDeclare takes quite a number of parameters. These are as follows:
Read now
Unlock full access