Skip to content

Commit e431367

Browse files
committed
documentation
Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent 9c9e2f2 commit e431367

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/examples/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
- [Video](video) - From the YouTube tutorial [AMQP 1.0 with Golang](https://youtu.be/iR1JUFh3udI)
1010
- [TLS](tls) - An example of how to use TLS with the AMQP 1.0 client.
1111
- [Advanced Settings](advanced_settings) - An example of how to use the advanced connection settings of the AMQP 1.0 client.
12-
- [Broadcast](broadcast) - An example of how to use fanout to broadcast messages to multiple auto-deleted queues.
12+
- [Broadcast](broadcast) - An example of how to use fanout to broadcast messages to multiple auto-deleted queues.
13+
- [RPC Echo](rpc_echo_server) - An example of how to implement RPC with the AMQP 1.0 client.

docs/examples/rpc_echo_server/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ func (s *echoRpcServer) stop(ctx context.Context) {
2222
}
2323

2424
func newEchoRpcServer(conn *rabbitmqamqp.AmqpConnection) *echoRpcServer {
25-
conn.Management().DeclareQueue(context.TODO(), &rabbitmqamqp.QuorumQueueSpecification{
25+
_, err := conn.Management().DeclareQueue(context.TODO(), &rabbitmqamqp.QuorumQueueSpecification{
2626
Name: rpcServerQueueName,
2727
})
28+
if err != nil {
29+
panic(err)
30+
}
2831
srv, err := conn.NewRpcServer(context.TODO(), rabbitmqamqp.RpcServerOptions{
2932
RequestQueue: rpcServerQueueName,
3033
Handler: func(ctx context.Context, request *amqp.Message) (*amqp.Message, error) {

0 commit comments

Comments
 (0)