Skip to content
linsen edited this page May 29, 2020 · 13 revisions

1. General Queue

Support for RabbitMQ and the other MQ based amqp2.0 protocol.

2. Configuration

application.conf

bool enabled = false;
string host = "127.0.0.1";
string username = "guest";
string password = "guest";
ushort port = 5672;
uint timeout = 15000;

3.How to use

  1. producer
string message = "hello world";
AbstractQueue queue  = messageQueue();
queue.push("my-queue", cast(ubyte[])message);
  1. consumer
string ChannelName = "my-queue";
AbstractQueue queue  = messageQueue();
queue.addListener(ChannelName, (ubyte[] message) 
{
   string msg = cast(string)message;
   writeln("Received message: %s", msg);
});
Clone this wiki locally