Java SpringRabbit是否需要声明用于发送消息的队列

Java SpringRabbit是否需要声明用于发送消息的队列,java,spring,rabbitmq,Java,Spring,Rabbitmq,我需要向MQ服务器发送一条名为“myQueue”的队列消息。我应该在spring中声明所有必需的bean,比如队列等等。对我来说,这似乎没什么用,因为我只需要发送到服务器,如果可能的话接收,我不会监听队列,是否可以在没有任何显式配置的情况下将其扔到那里然后忘记 I need to send a message to a queue with name "myQueue" to the MQ server. Should I declare all required beans in sprin

我需要向MQ服务器发送一条名为“myQueue”的队列消息。我应该在spring中声明所有必需的bean,比如队列等等。对我来说,这似乎没什么用,因为我只需要发送到服务器,如果可能的话接收,我不会监听队列,是否可以在没有任何显式配置的情况下将其扔到那里然后忘记

I need to send a message to a queue with name "myQueue" to the MQ server. 
Should I declare all required beans in spring, like Queue and etc for it.
不可以。若不声明连接工厂、exchange和队列等bean,则无法将消息发布到队列

It seems to me useless because I only need to send to server, and receive if possible, 
I`m not going to listen the queue, is it possible just to throw it there and forget, without any explicit configuration?
Spring并不是超级自然的,尽管您是否使用您的消息如果您想将消息推送到队列Spring应该知道连接和队列详细信息

您可以参考SpringRabbit编程的更多细节