Docker and AMQP (TryMe)

I am new to solace and have used docker to create solace container on my laptop. I am able to connect using "Try Me UI" with the address "ws://localhost:8008" and all works fine including sending messages, however, when i try connecting using AMQP protocol with the broker url "amqp://localhost:5672", it cannot establish connection and gives an exception ("SessionProperties validation: Property 'url' contained a URL'amqp://localhost:5672' with an invalid protocol: 'amqp:'").

I have already looked in to the Message VPN -> Services -> AMQP (PlainText) and can confirm that 5672 is the configured port. Please help!

FYI - This was used to setup my local solace container - https://docs.solace.com/Solace-SW-Broker-Set-Up/Docker-Containers/Set-Up-Docker-Container-Windows.htm

Tagged:

Comments

  • arih
    arih Member, Employee Posts: 125 Solace Employee
    edited April 2022 #2

    Hi @rahulbabbar ,

    If you're using the try me apps, it supports Solace SMF via websockets only. For AMQP you'd need to use your own or use the AMQP samples such as one available here https://github.com/SolaceSamples/solace-samples-amqp-qpid-jms2

  • rahulbabbar
    rahulbabbar Member Posts: 6

    Thanks for your reply. It makes sense.

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 491 admin

    @rahulbabbar one particular diagram I always use to explain protocol translation and interoperability is the following

    As Ari has mentioned, the TryMe GUI interface uses websocket protocol to connect to the broker. If you want to use AMQP to connect to the Solace Broker you will have to use your own AMQP application and establish a connection that way. Hopefully this is helpful!

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 522 admin
    • For SMF, we have the TryMe WebSocket apps
    • For REST, we can use cURL or Postman
    • For MQTT, we can use MQTTLens or MQTTX
    • For AMQP, I don't know of any little tester apps out there?

    Anybody?

  • rahulbabbar
    rahulbabbar Member Posts: 6

    Hi Aaron,

    In my case, for sending messages to AMQP/AMQPS, I had to write some code in c# and use this library https://github.com/Azure/amqpnetlite. It is able to send and receive messages on AMQP/s protocol.

    These are some examples. Example 6 here could help.

    https://csharp.hotexamples.com/examples/Amqp/SenderLink/-/php-senderlink-class-examples.html

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 522 admin

    Nice. I wish there was a little GUI app or Chrome plugin to send/receive via AMQP. None that I know of..?