I'm getting confused by basics here. I'm basically trying to declare,publish to, bind to, and receive from to a named exchange of name "hello" and type "amq.fanout". However, I'm getting tripped up on what exactly I have to declare for it. According to this, I have to declare the exchange name and type, and optionally durability and lifetime semantics for the exchange.
The essentially confusing thing is that when I look at usages of amq_basic_publish, I don't see a place to publish to an exchange by name. The parameters are the exchange type, and the queue_name. This is confusing me to because in my mental model, when publishing in amq, you publish to a named exchange and know nothing about queues. So why is publish receiving a queue_name?
When I declare an exchange, it looks like I can supply the 'exchange', which I presume is the name of the exchange, and well as the exchange type, e.g. amq.fanout. From examples/amqp_exchange_declare.c
amqp_exchange_declare(conn,
1,
amqp_cstring_bytes(exchange),
amqp_cstring_bytes(exchangetype),
0, 0, 0, 0,
amqp_empty_table);
But then if I look at an example of publishing, there is a place to supply the exchange type, in the second parameter which is named exchange. For example, examples/amqp_producer.c
amqp_basic_publish(conn,
1,
amqp_cstring_bytes("amq.direct"),
amqp_cstring_bytes(queue_name),
0,
0,
NULL,
message_bytes)
But there's no place to supply the name of the exchange. So how can I publish to a named exchange?
Best regards,
Mason Kramer
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.