-1

I am trying to connect to my local ActiveMQ. On connection attempt I get the following message:

invalid uri: stomp://0.0.0.0:61613 [invalid broker(s): 'NoneType' object has no attribute 'groupdict']

My activemq.xml has following enteries

<transportConnectors>
    <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
</transportConnectors>

and this is my code

def copy_activemq_to_s3():
    """

    :param environment_config:
    :param entity_config:
    :param entity_name:
    :return:
    """

    uri = "stomp://0.0.0.0:61613"
    user_name = "system"
    password = "manager"
    queue = "my_queue"
    connection = stormpest_conn(uri, user_name, password)

    # write_message(connection, queue)
    read_message(connection, queue)


def stormpest_conn(uri, user_name, password):
    config = StompConfig(
        uri=uri,
        login=user_name,
        passcode=password,
        sslContext=sslContext
    )

    client = Stomp(config)
    client.connect(connectTimeout=10000, connectedTimeout=10000)

    return client

Now I don't know what's causing it connect to ActiveMQ?

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43
noobie-php
  • 6,817
  • 15
  • 54
  • 101

1 Answers1

1

Looking at the STOMPest (?) client documentation it is pretty obvious that you are using the wrong URI. The stomp URI scheme is incorrect as per the examples as documented here. The client documentation I've been able to find would indicate that you want to use a URI scheme of 'tcp' or 'ssl' depending on which you want to use as the transport.

Tim Bish
  • 17,475
  • 4
  • 32
  • 42