/elixir_solace

Integration of Elixir Lang with Solace PubSub+

Primary LanguageElixir

Elixir-Solace

This project demonstrates integration between Elixir and the Solace PubSub+ Event Broker.

The project implements a workflow as follows:

Hello-Elixir

How to run

  1. Install Elixir

  2. Sign up for a Solace PubSub+ Cloud Messaging Service for free

  3. Modify config/config.exs with the mqtt host/credentials from the connections tab in your Solace PubSub+ Cloud Service as shown below: MQTT Credentials

  4. Run the following command to start the responder

  $ iex -S mix
  iex(1)> Solace.Hello.Responder.start_connection

You should see the following output:

[info] Succesfully connected!
 
[info] Succesfully subscribed to hello/request!
  1. Start a new shell (while the previous one is still running) and run the following command:
  $ iex -S mix
  iex(1)> Solace.Hello.Requestor.start_connection
  iex(2)> Solace.Helllo.Requestor.send_request

If your first shell is still running, you should see the following output:

[info] Hello World!