Polymer, Deepstream.IO and RabbitMQ

we'd like to set up a notification engine that uses AMQP. To achieve this, we're using RabbitMQ. That's fine, the server is installed and configured.

Now, we'd like to access the RabbitMQ message queues from a browser, so we need to have a wrapper around AMQP. For this, we found deepstream.io. This is especially fine, because we use Polymer as frontend which is supported by deepstream.io.

We configured deepstream.io to use rabbitMQ as backend, but the connection from Polymer to deepstream.io does not work:

The sets up the connection, we can see this in the deepstream server log (INCOMING_CONNECTION), but the component seems to be the problem. After a long timeout the log file reports a CONNECTION_AUTHENTICATION_TIMEOUT.

How can I set the user name and passwort specified in the deepstream.io config file in the component?

Thank you!

Upvotes: 0

Views: 544

Answers (1)

yasserf
yasserf

Reputation: 391

According to the ds-tutorial-polymer repo you connect to deepstream as follows:

        <ds-connection 
            url="localhost:6020" 
            ds={{ds}}>
        </ds-connection>

        <template is="dom-if" if="[[ds]]">

            <ds-login 
                auto-login
                ds="[[ds]]">
            </ds-login>

            <todos-list 
                name="polymer_example/todos"
                ds="[[ds]]">
            </todos-list>

        </template>

This exposes deepstream as a global ds for you to pass to other records and lists.

If you switch off auto-login within the ds-login you will need to call the login method on the prototype. An example ( and rest of documentation ) can been seen here:

http://deepstreamio.github.io/deepstream.io-tools-polymer/components/deepstream.io-tools-polymer/#ds-login

Upvotes: 0

Related Questions