1. client.onConnect = function (frame) {
  2. console.log('onConnect', frame)
  3. client.subscribe('/topic/event.agent.*.abc_cc', function (msg) {
  4. console.log(msg)
  5. }, {
  6. id: 'wdd',
  7. 'x-queue-name': 'wdd-queue'
  8. })
  9. }

在mq管理端:
image.png

Optional Arguments

Optional queue arguments, also known as “x-arguments” because of their field name in the AMQP 0-9-1 protocol, is a map (dictionary) of arbitrary key/value pairs that can be provided by clients when a queue is declared. -https://www.rabbitmq.com/queues.html