I have a basic question in RabbitMQ. In case of Spring AMQP, in both XML configuration and Java configuration using annotations, the type of exchange being used is known only at the listener side. I mean to at, only the consumer configuration code contains the type of exchange being used (topic/direct/fanout). At the sender side we will have -
amqpTemplate.convertAndSend("exchange_name", "routing_key",sampleMessage);
So is it like the sender code is not bothered or aware of the type(topic/direct/fanout) of exchange to which it is sending to??
In case of python, we have at the sender side,
channel.exchange_declare(exchange='logs',
exchange_type='fanout')
So here, the type of exchange is known at the sender. But in case of Spring, is exchange name is all that is available??