I wonder, are there rules of when to create a single queue in RabbitMQ and when multiple ones? Or is it up to a producer whether or not send the messages to a single queue or multiple ones and technically there's no difference? Should it depend on the schema of the db, that is, should a single table correspond to a single queue?
single queue in RabbitMQ and when multiple ones?
a single queue is a really bad idea. eventually you will want different types of messages to flow through rabbitmq. if you only have a single queue, you will end up reproducing the logic of how to decide which code should process the message, when RabbitMQ can do this for you with routing.
in general, each type of "work" to be done, represented by a message, should be it's own queue.
there will also be times when a specific message consumer will need it's own queue, even if the same types of messages are flowing to other queues.
Or is it up to a producer whether or not send the messages to a single queue or multiple ones
the producer does not decide which queues the message it delivered to. the producer only knows which exchange to publish through. message consumers should be the ones deciding where the messages are delivered. the message consumer should be responsible for setting up the routing between the exchange and the destination queue.
there are exceptions to this, like every "good idea" in software development, but in general i find this to be true
Should it depend on the schema of the db
your RabbitMQ configuration has zero correlation to your database. don't bother trying to map between the two. it will be painful, at best.
rather, look at behavior.
what type of behavior does this message need to trigger? what specific behavior is it, and which exchange / routing key should it be published with?
these are better questions that will lead you to a better RabbitMQ layout, with a focus on exchanges for groups of related messages, queues dedicated to a specific type of message consumer or a specific consumer, and routing keys that provide the logic to move a message from an exchange to the right queue.
...
i'd recommend reading some books on RabbitMQ, to get yourself rolling in the right direction with the basics of how RabbitMQ should be used, and then getting into good usage patterns and topology design: