Help to connect RabbitMQ with Solace Software Broker through AMQP

Hello,

I am new to Solace and have started practicing using some sample workshops from codelabs. I am currently facing an issue while trying to connect RabbitMQ with the Solace Software Broker (both running on Docker). RabbitMQ is configured to run on port 5672, while Solace AMQP is mapped to port 5673. Despite this, I am unable to connect and publish messages through RabbitMQ’s shovel.

Interestingly, when I connect RabbitMQ with the Cloud PubSub+ service, it works fine, and I am able to publish messages without any issues. However, the same configuration does not seem to work when using the Solace broker.

I would appreciate any guidance or suggestions on how to resolve this issue.

2025-04-07 10:21:40.498948+00:00 [info] <0.1502.0> Shovel 'shovel-to-solace' in virtual host 'shovel_vhost' will now try to connect...
2025-04-07 10:21:40.502665+00:00 [info] <0.1511.0> accepting AMQP connection <0.1511.0> (127.0.0.1:33612 -> 127.0.0.1:5672)
2025-04-07 10:21:40.507010+00:00 [info] <0.1511.0> connection <0.1511.0> (127.0.0.1:33612 -> 127.0.0.1:5672) has a client-provided name: Shovel shovel-to-solace
2025-04-07 10:21:40.509711+00:00 [info] <0.1511.0> connection <0.1511.0> (127.0.0.1:33612 -> 127.0.0.1:5672 - Shovel shovel-to-solace): user 'admin' authenticated and granted access to vhost 'shovel_vhost'
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>   crasher:
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     initial call: amqp10_client_frame_reader:init/1
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     pid: <0.1531.0>
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     registered_name: []
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     exception exit: econnrefused
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>       in function  gen_statem:init_result/8 (gen_statem.erl, line 1023)
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     ancestors: [<0.1529.0>,amqp10_client_sup,<0.708.0>]
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     message_queue_len: 0
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     messages: []
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     links: [<0.1529.0>]
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     dictionary: []
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     trap_exit: false
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     status: running
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     heap_size: 610
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     stack_size: 28
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>     reductions: 1632
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>   neighbours:
2025-04-07 10:21:40.513499+00:00 [error] <0.1531.0>
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>     supervisor: {<0.1529.0>,amqp10_client_connection_sup}
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>     errorContext: start_error
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>     reason: econnrefused
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>     offender: [{pid,undefined},
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                {id,reader},
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                {mfargs,
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                    {amqp10_client_frame_reader,start_link,
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                        [<0.1529.0>,
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                         #{notify => <0.1502.0>,port => 56722,
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                           address => "localhost",
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                           sasl =>
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                               {encrypted,
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                                   <<"R0Z9yiJxNOxPGHNdVShqlNmbj9H8obvlWZuhy2/2YEr1r5ARUOixCof9iUIPT4lfAaQwWdkhzwV8nz/pXWJe3jmEQFlAS4u3J3wIoWyuL+zSS/HsqlBwEI4SzH9JeWxA">>},
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                           hostname => <<"localhost">>,
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                           notify_when_opened => <0.1502.0>,
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                           notify_when_closed => <0.1502.0>}]}},
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                {restart_type,transient},
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                {significant,false},
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                {shutdown,5000},
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>                {child_type,worker}]
2025-04-07 10:21:40.514100+00:00 [error] <0.1529.0>
2025-04-07 10:21:40.514858+00:00 [error] <0.1502.0> Shovel 'shovel-to-solace' could not connect to destination: error {badmatch,
2025-04-07 10:21:40.514858+00:00 [error] <0.1502.0>                                                                    {error,
2025-04-07 10:21:40.514858+00:00 [error] <0.1502.0>                                                                     {shutdown,
2025-04-07 10:21:40.514858+00:00 [error] <0.1502.0>                                                                      {failed_to_start_child,
2025-04-07 10:21:40.514858+00:00 [error] <0.1502.0>                                                                       reader,
2025-04-07 10:21:40.514858+00:00 [error] <0.1502.0>                                                                       econnrefused}}}}
2025-04-07 10:21:40.516355+00:00 [info] <0.1511.0> closing AMQP connection <0.1511.0> (127.0.0.1:33612 -> 127.0.0.1:5672 - Shovel shovel-to-solace, vhost: 'shovel_vhost', user: 'admin')
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>     supervisor: {<0.721.0>,rabbit_shovel_dyn_worker_sup}
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>     errorContext: child_terminated
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>     reason: {shutdown,normal}
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>     offender: [{pid,<0.1502.0>},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                {id,{<<"shovel_vhost">>,<<"shovel-to-solace">>}},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                {mfargs,
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                    {rabbit_shovel_worker,start_link,
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                        [dynamic,
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                         {<<"shovel_vhost">>,<<"shovel-to-solace">>},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                         [{<<"dest-uri">>,
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                           [{encrypted,
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                                <<"mta0f/0rLwd29ujnpTnBo3sN2h3I1rOi9KSjCyPN1Py4OwlEnNN79UDWEYpzbQhgDu8C7eApO0+dJJEtL3wBpehJ5eQhJaGSuGg9zVQ4uKOzzGBhkLfo++vhFgO+pOGGBc6/W3DZJjdwd5bwGEfXdEjr5GDPjuWlSGEsIIltQlQ=">>}]},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"src-uri">>,
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                           [{encrypted,
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                                <<"QBaYiTQyHnzIBXAUJKX5d5a2zYpaAdhLOEI0C7nS0ZIXJwyBOg4CqTkBJLy1KVx67olVO7JfpdZZDI35kuigjIF4zEEHFUhSsh6zw6Ikj6QHRocuc3xDioCav7+diDxLcutnJvDr0z8BECpu65Yp9Q==">>}]},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"ack-mode">>,<<"on-confirm">>},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"dest-add-forward-headers">>,true},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"dest-address">>,<<"to/solace/topic">>},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"dest-protocol">>,<<"amqp10">>},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"reconnect-delay">>,5},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"src-delete-after">>,<<"never">>},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"src-protocol">>,<<"amqp091">>},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                          {<<"src-queue">>,<<"source-queue">>}]]}},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                {restart_type,{permanent,5}},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                {shutdown,4294967295},
2025-04-07 10:21:40.516082+00:00 [error] <0.721.0>                {child_type,worker}]

Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:

Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.

AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a :+1:. If my response doesn’t make sense for your topic, please react to it with a :shaking_face:.

The documentation indicates that connecting RabbitMQ to PubSub+ event broker requires special consideration due to protocol compatibility issues. Here’s why:

  1. RabbitMQ uses AMQP 0.9.1 which is incompatible with the AMQP 1.0 standard supported by PubSub+ event broker
  2. There is no direct connector provided by Solace for RabbitMQ integration

However, there are two main approaches to connect RabbitMQ with PubSub+ event broker:

  1. Using RabbitMQ Shovel plugin:

    • Install RabbitMQ AMQP 1.0 plugin and Shovel plugin
    • Configure Shovel to consume/publish messages between RabbitMQ and PubSub+ event broker
    • This allows bidirectional message flow between the systems
  2. Custom Implementation:

    • Write a custom connector using JMS over AMQP 1.0
    • This approach requires more development effort but provides more control

Sources:

Hi @Jayaram, is this still an open issue for you?
You mentioned Rabbit Shovel worked to connect to a Solace Cloud Broker, just having an issue with the Docker container version started on your own host. The ‘connection refused’ error seems to point towards a connectivity problem.

  • Do you have the right port specified in the shovel config? e.g. Going to the 5673 port you mentioned the Solace broker is on?
  • Are your Docker containers able to connect to each other using 127.0.0.1 localhost?

Thanks

Hi Jamil,

Solace AMQP is running on port 5675, and RabbitMQ is running on 5672, but the connection is still not working. I’m able to connect to the Solace Cloud Broker, and even after mapping the AMQP port correctly for Solace, it seems something is still mapping it to the default port 5672.

Appreciate your help in identifying where this mapping might be happening.

Thanks,
Jayaram

I’m not sure if you are still having issues. I don’t believe you can use localhost to access one docker container to another. Interpreting localhost at a container level stays within that container and not out to the docker runtime or host environment. Either use the IP/Hostname of the host or use docker network and reference the name of the solace container as the hostname.

1 Like