Skip to content

Commit

Permalink
Merge pull request #18 from tirithen/fix-examples
Browse files Browse the repository at this point in the history
fix(examples): fix broken imports and readme
  • Loading branch information
John-Colvin authored Nov 26, 2020
2 parents ed8b1f6 + e961c63 commit 283bce4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
12 changes: 10 additions & 2 deletions examples/README.MD
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
Arrange for a RabbitMQ or other AMQP server to be running on localhost at TCP port number 5672.

Also make sure that you have librabbitmq-c installed on your system.

In one terminal, run

./examples/listen --hostname localhost --port 5672 --exchange amq.direct --binding-key test --use-ssl=false
cd examples/listen
dub build
./listen --hostname localhost --port 5672 --exchange amq.direct --binding-key test --use-ssl=false


In another terminal,

./examples/sendstring --hostname localhost --port 5672 --exchange amq.direct --routing-key test --message-body "hello world" --use-ssl=false
cd examples/sendstring
dub build
./sendstring --hostname localhost --port 5672 --exchange amq.direct --routing-key test --message-body "hello world" --use-ssl=false

You should see output similar to the following in the listener's terminal window:

Expand Down
5 changes: 2 additions & 3 deletions examples/listen/source/listen.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import std.exception;
import std.conv:to;
import std.getopt;

import kaleidic.api.rabbitmq;
import symmetry.api.rabbitmq;

struct Options
{
Expand Down Expand Up @@ -46,7 +46,7 @@ int main(string[] args)
"key-file", &options.keyFile,
"cert-file", &options.certFile,
);

if (helpInformation.helpWanted)
{
defaultGetoptPrinter("listen",helpInformation.options);
Expand Down Expand Up @@ -147,4 +147,3 @@ private char[] fromBytes(void* ptr, ulong len)
return ret.data;
+/
}

2 changes: 1 addition & 1 deletion examples/old/amqps_consumer/amqps_consumer.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module kaleidic.api.rabbitmq.examples.bind;
import std.stdio;
import std.string;

import kaleidic.api.rabbitmq.rabbitmq;
import symmetry.api.rabbitmq.rabbitmq;
import utils;

enum SUMMARY_EVERY_US = 1000000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module kaleidic.api.rabbitmq.examples.bind;
import std.stdio;
import std.string;

import kaleidic.api.rabbitmq.rabbitmq;
import symmetry.api.rabbitmq.rabbitmq;
import utils;

int main(string[] args)
Expand Down
2 changes: 1 addition & 1 deletion source/symmetry/api/rabbitmq/platform_utils.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module symmetry.api.rabbitmq.platform_utils;
import std.conv:to;
// import kaleidic.api.rabbitmq;
// import symmetry.api.rabbitmq;

/+
#include <stdint.h>
Expand Down

0 comments on commit 283bce4

Please sign in to comment.